diff options
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -3,9 +3,18 @@ # /etc/rc.sysinit # +unset HOSTNAME + . /etc/rc.conf . /etc/rc.d/functions +if [[ $HOSTNAME ]]; then + print_depr "HOSTNAME=" "rc.conf(5) and hostname(5)" +fi +if [[ -s /etc/hostname ]]; then + HOSTNAME=$(< /etc/hostname) +fi + # don't let all the systemd tools be too verbose export SYSTEMD_LOG_LEVEL="notice" @@ -34,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 @@ -137,17 +151,6 @@ status 'Initializing random seed' /usr/lib/systemd/systemd-random-seed load # Remove leftover files remove_leftover -if [[ $HOSTNAME ]]; then - print_depr "HOSTNAME=" "rc.conf(5) and hostname(5)" -fi -if [[ -s /etc/hostname ]]; then - HOSTNAME=$(< /etc/hostname) -fi -if [[ $HOSTNAME ]]; then - stat_busy "Setting hostname: $HOSTNAME" - echo "$HOSTNAME" >| /proc/sys/kernel/hostname && stat_done || stat_fail -fi - stat_busy "Saving dmesg log" if [[ -e /proc/sys/kernel/dmesg_restrict ]] && (( $(< /proc/sys/kernel/dmesg_restrict) == 1 )); then |