aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-10-02 23:17:09 +0200
committerTom Gundersen <teg@jklm.no>2012-10-02 23:19:32 +0200
commit9ef15b0091e7869937f91c8d2ae5f9475fbe4d70 (patch)
tree3088122917397376bb20890aa8d49f43a4073c58 /rc.sysinit
parenta9ffc483b60f481bf4a8ba858f1c18f7b64bd5ad (diff)
downloadinitscripts-2012.09.2.tar.xz
hostname: don't try to set before /proc is mounted2012.09.2
No idea how I did not spot this obvious bug. [tomegun: note to self, I didn't spot the bug because it is only a problem when not booting with an initramfs...] Fixes: FS#31765 Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit8
1 files changed, 5 insertions, 3 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 458bac6..e18456e 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -14,9 +14,6 @@ fi
if [[ -s /etc/hostname ]]; then
HOSTNAME=$(< /etc/hostname)
fi
-if [[ $HOSTNAME ]]; then
- echo "$HOSTNAME" >| /proc/sys/kernel/hostname
-fi
# don't let all the systemd tools be too verbose
export SYSTEMD_LOG_LEVEL="notice"
@@ -46,6 +43,11 @@ bootlogd -p /run/bootlogd.pid
run_hook sysinit_start
+if [[ $HOSTNAME ]]; then
+ stat_busy "Setting hostname: $HOSTNAME"
+ echo "$HOSTNAME" >| /proc/sys/kernel/hostname && stat_done || stat_fail
+fi
+
HWCLOCK_PARAMS="--systz"
if [[ $HARDWARECLOCK ]]; then