--- elwix/config/etc/default/rc.initial 2013/01/24 13:14:15 1.1.2.1 +++ elwix/config/etc/default/rc.initial 2013/01/28 00:56:46 1.1.2.5 @@ -2,7 +2,7 @@ # # ELWIX Initial RC Menu script # -# $Id: rc.initial,v 1.1.2.1 2013/01/24 13:14:15 misho Exp $ +# $Id: rc.initial,v 1.1.2.5 2013/01/28 00:56:46 misho Exp $ # trap : 2 @@ -40,11 +40,14 @@ menu() echo echo "Available interfaces: $IFACES" read -p " +Which from them: " iface + if [ -z "$iface" ]; then + return 1 + fi read -p " +Name of interface $iface []: " name read -p " +Setup management vlan 4093 on $iface? [no|yes]: " mgmt 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 + if [ X"$mgmt" = X"yes" -o X"$mgmt" = X"y" ]; then cfexec sh -c "echo $iface >/etc/mylan" fi ifconfig $iface description "$name" up @@ -82,9 +85,12 @@ menu() 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 + read -p " +Are you sure for restore and clear all changes? [no|yes]: " ans + if [ X"$ans" = X"yes" -o X"$ans" = X"y" ]; then + cfexec rm -rf /elwix/etc/rc.S /elwix/etc/rc.s /elwix/etc/rc.t + cfexec tar -xzpf /elwix/altroot/backup/.var.tgz -C /elwix/altroot + cfexec tar -xzpf /elwix/altroot/backup/.etc.tgz -C /elwix + fi ;; 5) reboot