--- elwix/config/etc/Attic/rc.initial 2013/01/23 14:17:16 1.2.2.2 +++ elwix/config/etc/Attic/rc.initial 2013/01/23 15:00:39 1.2.2.3 @@ -2,7 +2,7 @@ # # ELWIX Initial RC Menu script # -# $Id: rc.initial,v 1.2.2.2 2013/01/23 14:17:16 misho Exp $ +# $Id: rc.initial,v 1.2.2.3 2013/01/23 15:00:39 misho Exp $ # trap : 2 @@ -28,7 +28,7 @@ menu() echo "8) Go to shell" [ -r /etc/platform ] && PLATFORM=$(cat /etc/platform) if [ "${PLATFORM}" != "embedded" ]; then - echo "9) Install on Hard Drive $PLATFORM"; + echo "9) Clone system on other drive"; fi echo @@ -48,7 +48,7 @@ menu() read -p " +IPv4 address/mask of interface $iface [dhcp|x.x.x.x/x]: " ip4 read -p " +IPv6 address/mask of interface $iface [auto|x:x:x::x/x]: " ip6 if [ X"$mgmt" = X"yes" -o X"$mgmt" = "y" ]; then - echo $iface >/etc/mylan + cfexec sh -c "echo $iface >/etc/mylan" fi ifconfig $iface description "$name" up if [ -n "$ip4" ]; then @@ -74,6 +74,11 @@ menu() 3) ;; 4) + echo + echo "Restore factory defaults ..." + cfexec rm -rf /elwix/etc/rc.S /elwix/etc/rc.s /elwix/etc/rc.t + cfexec tar -xzpf /elwix/backup/.var.tgz -C /elwix/altroot + cfexec tar -xzpf /elwix/altroot/backup/.etc.tgz -C /elwix ;; 5) reboot @@ -93,6 +98,18 @@ menu() $SHELL ;; 9) + echo + camcontrol devlist + echo + read -p " +Select drive [like: ada1]: " dev + if [ -n "$dev" ]; then + if `disklabel $dev`; then + read -p " +This is right choice? [no|yes]: " ask + if [ X"$ask" = X"yes" -o X"$ask" = X"y" ]; then + echo work ..... + fi + fi + fi ;; esac }