I want an option at runlevel 3 ( Console-only login .. no GUI login ) to choose halt or reboot the PC. This is useful in case
create a script named "options" in /etc/rc.d Here are the contents :
#!/bin/sh clear RUNLEVEL=`runlevel | cut -f2 -d " "` if [ "$RUNLEVEL" -eq 3 ] then echo "Select :" echo "[1] Login" echo "[2] Shutdown" echo "[3] Reboot" read -p "Do : " option case $option in 2) halt;; 3) reboot;; *) clear;; esac else clear fi
make the script executable with chmod add an entry in /etc/rc.local sh /etc/rc.d/options
Now whenever ur computer boots for into runlevel 3 then it executes this script or else it skips it.
__________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree