]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/system/firstsetup
flash-images: merge normal and scon to one image.
[ipfire-2.x.git] / src / initscripts / system / firstsetup
CommitLineData
6cf9e770 1#!/bin/bash
e5713a7e
AF
2
3# Exit if firstsetup was already done...
4if [ -e /var/ipfire/main/firstsetup_ok ]; then
5 exit 0;
6fi
7
6b566244
AF
8# disable consoles if tty2 are not present
9if [ ! -e /dev/tty2 ]; then
10 # Disable console on tty2-6
11 sed -i -e "s|2:2345:respawn:|#2:2345:respawn:|g" /etc/inittab
12 sed -i -e "s|3:2345:respawn:|#3:2345:respawn:|g" /etc/inittab
13 sed -i -e "s|4:2345:respawn:|#4:2345:respawn:|g" etc/inittab
14 sed -i -e "s|5:2345:respawn:|#5:2345:respawn:|g" /etc/inittab
15 sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" /etc/inittab
16fi
17
e0b28afe
AF
18# reload inittab
19/sbin/init q
20#
ceb5098e 21/etc/init.d/sysklogd start
ef7d03bb 22export LANG=en_US.utf8
687fc4a9 23/usr/sbin/setup /dev/tty2 INSTALL
e238e4c2
AF
24if [ "${?}" == "1" ]; then
25 echo Setup not finished. Rebooting ...
26 reboot -f
27fi
e5713a7e
AF
28
29# plan install pae kernel at next pakfire update if pae is supported
e5713a7e 30if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
7676ceba
AF
31 if [ ! -e /opt/pakfire/db/installed/meta-linux-pae ]; then
32 echo "Name: linux-pae" > /opt/pakfire/db/installed/meta-linux-pae
33 echo "ProgVersion: 0" >> /opt/pakfire/db/installed/meta-linux-pae
34 echo "Release: 0" >> /opt/pakfire/db/installed/meta-linux-pae
1a78fe5e 35 fi
e5713a7e
AF
36fi
37
156bae21
AF
38echo Restarting udev...
39killall udevd
aa8512fa 40/sbin/udevadm hwdb --update
156bae21
AF
41/sbin/udevd --daemon
42/sbin/udevadm trigger
43/sbin/udevadm settle
ceb5098e 44/etc/init.d/sysklogd stop
e5713a7e 45touch /var/ipfire/main/firstsetup_ok