Menu

[r431]: / trunk / etc / rc.initial  Maximize  Restore  History

Download this file

91 lines (73 with data), 1.3 kB

#!/bin/sh

# /etc/rc.initial
# part of m0n0wall (http://neon1.net/m0n0wall)
# Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
# All rights reserved.
# Modified for FreeNAS (http://www.freenas.org) by Olivier Cochard-Labbe <olivier@freenas.org>

# make sure the user can't kill us by pressing Ctrl-C
trap : 2
trap : 3

# redirect input/output
exec </dev/console >/dev/console 2>/dev/console

if [ -r /var/etc/disableconsole ]; then

while : ; do

echo
echo
echo "*** Console menu disabled. ***"
echo

read tmp

done

#/bin/sleep 10

else

# endless loop
while : ; do

# Change permission to the / directory
chmod 711 root /

# display a cheap menu
echo
echo
echo "Console setup"
echo "*************"
echo "1) Assign Interfaces"
echo "2) Set LAN IP address"
echo "3) Reset webGUI password"
echo "4) Reset to factory defaults"
echo "5) Reboot system"
echo "6) Ping host"
echo "7) Install from CDROM to HD/CF/USB Key"
echo "8) Shell"
echo "9) PowerOff system"
echo

read -p "Enter a number: " opmode

# see what the user has chosen
case ${opmode} in
1)
	/etc/rc.initial.setports
 	;;
2)
	/etc/rc.initial.setlanip
 	;;
3)
	/etc/rc.initial.password
	;;
4)
	/etc/rc.initial.defaults
	;;
5)
	/etc/rc.initial.reboot
	;;
6)
	/etc/rc.initial.ping
	;;
7)
	/etc/rc.initial.install
	;;
8)
	/bin/tcsh
	;;
9)
	/etc/rc.initial.halt
	;;
esac

done

fi
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.