summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-10-05 14:19:28 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-10-05 14:19:28 -0300
commit1cdbdd96531bb637db0fda2dce188ccb8b170e00 (patch)
tree8ee361b868af2b5047f7083ebb12ffd0798f4122
parenta1642a5964035040dcbf07af01418375e45bb128 (diff)
parent1ef1701df3e156ac67af827ff9b5139c3b8512c3 (diff)
Merge branch 'master' of git://projects.archlinux.org/initscripts
-rw-r--r--PKGBUILD7
-rwxr-xr-xrc.sysinit25
2 files changed, 18 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ccfeee4..59312a8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,12 +11,13 @@ provides=('initscripts=9999')
replaces=('initscripts-systemd')
backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown)
makedepends=('asciidoc')
-depends=('glibc' 'bash' 'coreutils' 'systemd-tools' 'iproute2'
- 'ncurses' 'kbd' 'findutils' 'sysvinit')
+depends=('glibc' 'bash' 'coreutils' 'systemd' 'iproute2'
+ 'ncurses' 'kbd' 'findutils')
optdepends=('net-tools: legacy networking support'
'bridge-utils: Network bridging support'
'dhcpcd: DHCP network configuration'
- 'wireless_tools: Wireless networking')
+ 'wireless_tools: Wireless networking'
+ 'sysvinit: Legacy init support')
source=()
sha256sums=()
diff --git a/rc.sysinit b/rc.sysinit
index b285cc7..e18456e 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -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