aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-05-11 00:54:58 (GMT)
committerTom Gundersen <teg@jklm.no>2012-05-11 00:55:54 (GMT)
commit2915407c58c4c9cc91ae778f9565e45e8466824e (patch)
tree34387a34436510664a4f692530f031c5bd5d2c9c /rc.sysinit
parent86b2cb99028d81a6cb608f09e1a31bc7744a991c (diff)
downloadinitscripts-2915407c58c4c9cc91ae778f9565e45e8466824e.tar.xz
console: configure console after modules have been loaded
This should probably be fixed elsewhere, but for now only configure the console once the KMS drivers have been loaded to avoid the settings getting lost. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit70
1 files changed, 35 insertions, 35 deletions
diff --git a/rc.sysinit b/rc.sysinit
index f91190c..32313ab 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -36,6 +36,41 @@ run_hook sysinit_start
# log all console messages
bootlogd -p /run/bootlogd.pid
+if [[ ! -a /usr/lib ]] ; then
+ printf "${C_FAIL}/usr is not mounted. This is not supported.${C_OTHER}\n"
+fi
+
+if ! grep -q devtmpfs /proc/filesystems; then
+ printf "${C_FAIL}Your kernel does not have devtmpfs support. This is not supported.${C_OTHER}\n"
+fi
+
+HWCLOCK_PARAMS="--systz"
+case $HARDWARECLOCK in
+ "") ;;
+ UTC) HWCLOCK_PARAMS+=" --utc --noadjfile";;
+ localtime) HWCLOCK_PARAMS+=" --localtime --noadjfile";;
+ *) HWCLOCK_PARAMS="";;
+esac
+
+if [[ $HWCLOCK_PARAMS ]]; then
+ stat_busy "Adjusting system time and setting kernel timezone"
+
+ # Adjust the system time for timezone offset if rtc is not in UTC
+ # 1. Make creation time on device nodes sane (FS#8665)
+ # 2. Filesystem checks can depend on system time
+ # 3. This also sets the kernel time zone, used by e.g. vfat
+ # If TIMEZONE is not set in rc.conf, the timezone stored in /etc/localtime
+ # is used. If HARDWARECLOCK is not set in rc.conf, the value in
+ # /var/lib/hwclock/adjfile is used (in this case /var can not be a separate
+ # partition).
+ [[ $TIMEZONE ]] && export TZ=$TIMEZONE
+ hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
+ unset TZ
+fi
+
+# Start/trigger UDev, load MODULES and settle UDev
+udevd_modprobe sysinit
+
if [[ -s /etc/locale.conf ]]; then
parse_envfile /etc/locale.conf "LANG"
[[ $LANG ]] && LOCALE=$LANG
@@ -73,41 +108,6 @@ fi
# Set console font if required
set_consolefont
-if [[ ! -a /usr/lib ]] ; then
- printf "${C_FAIL}/usr is not mounted. This is not supported.${C_OTHER}\n"
-fi
-
-if ! grep -q devtmpfs /proc/filesystems; then
- printf "${C_FAIL}Your kernel does not have devtmpfs support. This is not supported.${C_OTHER}\n"
-fi
-
-HWCLOCK_PARAMS="--systz"
-case $HARDWARECLOCK in
- "") ;;
- UTC) HWCLOCK_PARAMS+=" --utc --noadjfile";;
- localtime) HWCLOCK_PARAMS+=" --localtime --noadjfile";;
- *) HWCLOCK_PARAMS="";;
-esac
-
-if [[ $HWCLOCK_PARAMS ]]; then
- stat_busy "Adjusting system time and setting kernel timezone"
-
- # Adjust the system time for timezone offset if rtc is not in UTC
- # 1. Make creation time on device nodes sane (FS#8665)
- # 2. Filesystem checks can depend on system time
- # 3. This also sets the kernel time zone, used by e.g. vfat
- # If TIMEZONE is not set in rc.conf, the timezone stored in /etc/localtime
- # is used. If HARDWARECLOCK is not set in rc.conf, the value in
- # /var/lib/hwclock/adjfile is used (in this case /var can not be a separate
- # partition).
- [[ $TIMEZONE ]] && export TZ=$TIMEZONE
- hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
- unset TZ
-fi
-
-# Start/trigger UDev, load MODULES and settle UDev
-udevd_modprobe sysinit
-
# bring up the loopback interface
[[ -d /sys/class/net/lo ]] &&
status "Bringing up loopback interface" ip link set up dev lo