Project

General

Profile

Download (1.96 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2

    
3
# $Id$
4
# /etc/rc.initial
5
# part of pfSense by Scott Ullrich
6
# Copyright (C) 2004 Scott Ullrich, All rights reserved.
7
# originally based on m0n0wall (http://neon1.net/m0n0wall)
8
# Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
9
# All rights reserved.
10

    
11
# make sure the user can't kill us by pressing Ctrl-C,
12
# ctrl-z, etc.
13
trap : 2
14
trap : 3
15
trap : 4
16

    
17
CONFIG="/cf/conf/config.xml"
18
WORD="https"
19

    
20
# Set our operating platform
21
PLATFORM=`cat /etc/platform`
22

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

    
25
while : ; do
26

    
27
echo
28
echo
29
echo "*** Console menu disabled. ***"
30
echo
31

    
32
read tmp
33

    
34
done
35

    
36
else
37

    
38
# endless loop
39
while : ; do
40

    
41
/etc/rc.banner
42

    
43
echo
44

    
45
# display a cheap menu
46
echo
47
echo " pfSense console setup "
48
echo "***********************"
49
echo " 0)  Logout (SSH only)"
50
echo " 1)  Assign Interfaces"
51
echo " 2)  Set LAN IP address"
52
echo " 3)  Reset webGUI password"
53
echo " 4)  Reset to factory defaults"
54
echo " 5)  Reboot system"
55
echo " 6)  Halt system"
56
echo " 7)  Ping host"
57
echo " 8)  Shell"
58
echo " 9)  PFtop"
59
echo "10)  Traffic Logs"
60
echo
61

    
62
if [ "$PLATFORM" = "cdrom" ]; then
63
    echo "Run installer for the stable BSD Installer"
64
    echo
65
fi
66

    
67
read -p "Enter an option: " opmode
68
echo
69

    
70
# see what the user has chosen
71
case ${opmode} in
72
0)
73
        exit && exit && logout
74
        ;;
75
1)
76
        /etc/rc.initial.setports
77
        ;;
78
2)
79
        /etc/rc.initial.setlanip
80
        ;;
81
3)
82
        /etc/rc.initial.password
83
        ;;
84
4)
85
        /etc/rc.initial.defaults
86
        ;;
87
5)
88
        /etc/rc.initial.reboot
89
        ;;
90
6)
91
        /etc/rc.initial.halt
92
        ;;
93
7)
94
        /etc/rc.initial.ping
95
        ;;
96
8)
97
	set prompt="%n\@%m\:%~# "
98
        /bin/tcsh
99
        ;;
100
9)
101
        /usr/local/sbin/pftop
102
        ;;
103
10)
104
	/usr/sbin/tcpdump -n -e -ttt -i pflog0
105
	;;
106
installer.lua)
107
	/scripts/lua_installer
108
	;;
109
installer)
110
	/scripts/installer.sh
111
	;;
112
99)
113
        if grep "$WORD" "$CONFIG"
114
        then
115
        	links "https://localhost"
116
        else
117
        	links "http://localhost"
118
        fi
119
        ;;
120
esac
121

    
122
sleep 1
123

    
124
done
125

    
126
fi
(32-32/54)