--- elwix/config/etc/Attic/rc.initial 2013/01/23 15:00:39 1.2.2.3 +++ elwix/config/etc/Attic/rc.initial 2013/01/24 13:01:39 1.2.2.6 @@ -2,13 +2,13 @@ # # ELWIX Initial RC Menu script # -# $Id: rc.initial,v 1.2.2.3 2013/01/23 15:00:39 misho Exp $ +# $Id: rc.initial,v 1.2.2.6 2013/01/24 13:01:39 misho Exp $ # trap : 2 trap : 3 trap : 18 -#exec /dev/console 2>/dev/console +exec /dev/console 2>/dev/console MAGIC_MENU="menu" menu() @@ -26,10 +26,7 @@ menu() echo "6) Ping host" echo "7) SSH to host" echo "8) Go to shell" - [ -r /etc/platform ] && PLATFORM=$(cat /etc/platform) - if [ "${PLATFORM}" != "embedded" ]; then - echo "9) Clone system on other drive"; - fi + echo "9) Clone system on other drive"; echo read -p "Enter number: " opcode @@ -72,6 +69,15 @@ menu() passwd root ;; 3) + echo + read -p "New system webGUI password: " pass + read -p "Confirm system webGUI password: " confirm + if [ X"$pass" = X"$confirm" ]; then + cfexec xmler -s /elwix/system/password /elwix/etc/config.xml \ + $(md5 -qs "$pass") + else + echo "Error:: passwords are different ..." + fi ;; 4) echo @@ -106,7 +112,9 @@ menu() 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 ..... + sysctl -w kern.geom.debugflags=16 + dd if=/dev/ufs/elwix of=/dev/$dev + sysctl -w kern.geom.debugflags=0 fi fi fi