]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/initscripts/init.d/firstsetup
Merge remote-tracking branch 'ms/timezone-transision' into next
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / 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
e0b28afe
AF
8# Edit the serial console entry at /etc/inittab matching to console parameter.
9ser_console() {
10 while test x"$1" != x
11 do
12 case $1 in
13 console=*)
14 scon=${1##console=};
15 sed -i -e "s|^7:2345:respawn:/sbin/agetty.*|7:2345:respawn:/sbin/agetty ${scon%%,*} ${scon##*,}|g" /etc/inittab
16 shift
17 ;;
18 *)
19 shift
20 ;;
21 esac
22 done
23}
24cmdline=`cat /proc/cmdline`
25ser_console $cmdline
26# reload inittab
27/sbin/init q
28#
ceb5098e 29/etc/init.d/sysklogd start
ef7d03bb 30export LANG=en_US.utf8
6cf9e770 31/usr/local/sbin/setup /dev/tty2 INSTALL
e238e4c2
AF
32if [ "${?}" == "1" ]; then
33 echo Setup not finished. Rebooting ...
34 reboot -f
35fi
e5713a7e
AF
36
37# plan install pae kernel at next pakfire update if pae is supported
e5713a7e 38if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
7676ceba
AF
39 if [ ! -e /opt/pakfire/db/installed/meta-linux-pae ]; then
40 echo "Name: linux-pae" > /opt/pakfire/db/installed/meta-linux-pae
41 echo "ProgVersion: 0" >> /opt/pakfire/db/installed/meta-linux-pae
42 echo "Release: 0" >> /opt/pakfire/db/installed/meta-linux-pae
e2398186
AF
43 echo "Name: linux-pae" > /opt/pakfire/db/meta/meta-linux-pae
44 echo "ProgVersion: 0" >> /opt/pakfire/db/meta/meta-linux-pae
45 echo "Release: 0" >> /opt/pakfire/db/meta/meta-linux-pae
1a78fe5e 46 fi
e5713a7e
AF
47fi
48
156bae21
AF
49echo Restarting udev...
50killall udevd
aa8512fa 51/sbin/udevadm hwdb --update
156bae21
AF
52/sbin/udevd --daemon
53/sbin/udevadm trigger
54/sbin/udevadm settle
ceb5098e 55/etc/init.d/sysklogd stop
e5713a7e 56touch /var/ipfire/main/firstsetup_ok