]>
Commit | Line | Data |
---|---|---|
6cf9e770 | 1 | #!/bin/bash |
66c36198 PM |
2 | ############################################################################### |
3 | # # | |
4 | # IPFire.org - A linux based firewall # | |
5 | # Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> # | |
6 | # # | |
7 | # This program is free software: you can redistribute it and/or modify # | |
8 | # it under the terms of the GNU General Public License as published by # | |
9 | # the Free Software Foundation, either version 3 of the License, or # | |
10 | # (at your option) any later version. # | |
11 | # # | |
12 | # This program is distributed in the hope that it will be useful, # | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
15 | # GNU General Public License for more details. # | |
16 | # # | |
17 | # You should have received a copy of the GNU General Public License # | |
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
19 | # # | |
20 | ############################################################################### | |
e5713a7e AF |
21 | |
22 | # Exit if firstsetup was already done... | |
23 | if [ -e /var/ipfire/main/firstsetup_ok ]; then | |
24 | exit 0; | |
25 | fi | |
26 | ||
c4172fad AF |
27 | # disable consoles if tty are not present |
28 | openvt -f -w -- /bin/sh -c echo > /dev/null 2>&1 | |
29 | if [ ! "${?}" == "0" ]; then | |
6b566244 AF |
30 | # Disable console on tty2-6 |
31 | sed -i -e "s|2:2345:respawn:|#2:2345:respawn:|g" /etc/inittab | |
32 | sed -i -e "s|3:2345:respawn:|#3:2345:respawn:|g" /etc/inittab | |
33 | sed -i -e "s|4:2345:respawn:|#4:2345:respawn:|g" etc/inittab | |
34 | sed -i -e "s|5:2345:respawn:|#5:2345:respawn:|g" /etc/inittab | |
35 | sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" /etc/inittab | |
36 | fi | |
37 | ||
e0b28afe AF |
38 | # reload inittab |
39 | /sbin/init q | |
40 | # | |
ceb5098e | 41 | /etc/init.d/sysklogd start |
ef7d03bb | 42 | export LANG=en_US.utf8 |
687fc4a9 | 43 | /usr/sbin/setup /dev/tty2 INSTALL |
e238e4c2 AF |
44 | if [ "${?}" == "1" ]; then |
45 | echo Setup not finished. Rebooting ... | |
46 | reboot -f | |
47 | fi | |
e5713a7e | 48 | |
ceb5098e | 49 | /etc/init.d/sysklogd stop |
e5713a7e | 50 | touch /var/ipfire/main/firstsetup_ok |