From 33f549769f77ec7626dd8a88ec570c353906d8ac Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 7 Jun 2012 00:57:28 +0200 Subject: Makefile: fix --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c989789..825eb11 100644 --- a/Makefile +++ b/Makefile @@ -38,10 +38,10 @@ install: installdirs doc %.8: %.8.txt a2x -d manpage -f manpage $< -doc: $(MAN_PAGES) +doc: rc.conf.5 rc.d.8 clean: - rm -f $(MAN_PAGES) + rm -f rc.conf.5 rc.d.8 tar: git archive HEAD --prefix=initscripts-$(VER)/ | xz > initscripts-$(VER).tar.xz -- cgit v1.2.3 From 71bc476074836ffcf60069889f8b45234060db9e Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 7 Jun 2012 01:17:20 +0200 Subject: module-load: silence We don't need to see all modules inserted on every boot. Signed-off-by: Tom Gundersen --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index c498f8a..735f75f 100644 --- a/functions +++ b/functions @@ -347,7 +347,7 @@ kill_all() { load_modules() { local rc=0 - /usr/lib/systemd/systemd-modules-load + /usr/lib/systemd/systemd-modules-load &>/dev/null rc=$? if (( ${#MODULES[*]} )); then -- cgit v1.2.3 From 6bd9bf8f66ae68ab3be48577ca223d0f47947512 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 8 Jun 2012 10:05:38 -0400 Subject: use systemd-remount-fs to remount root This has the added bonus of scanning /etc/fstab and remounting API filesystems should they be explicitly defined with extra options. Signed-off-by: Dave Reisner --- rc.sysinit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 876542a..58f3216 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -119,8 +119,8 @@ run_hook sysinit_postfsck # Single-user login and/or automatic reboot if needed fsck_reboot $fsckret -status "Remounting Root" \ - mount -o remount / +status "Remounting Root and API filesystems" \ + /usr/lib/systemd/systemd-remount-fs # now mount all the local filesystems run_hook sysinit_premount -- cgit v1.2.3 From 2b88be43076a5e3019da62b3b188d3f061b105ea Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 8 Jun 2012 10:09:31 -0400 Subject: remove checks for /var/run and /var/lock as symlinks These are shipped as symlinks by filesystem 2012.06, so these checks are no longer needed. Signed-off-by: Dave Reisner --- functions | 9 --------- 1 file changed, 9 deletions(-) diff --git a/functions b/functions index 735f75f..4a8ba7b 100644 --- a/functions +++ b/functions @@ -590,15 +590,6 @@ umount_all() { remove_leftover() { status -v 'Removing Leftover Files' systemd-tmpfiles --create --remove - # move from static /var/{run,lock} to /run - if [[ ! -L /var/lock ]]; then - rm -rf /var/lock - ln -s /run/lock /var/lock - fi - if [[ ! -L /var/run ]]; then - rm -rf /var/run - ln -s /run /var/run - fi } bootlogd_stop() { -- cgit v1.2.3 From b978858fec0a84194e9bd0ca83d7729332c7ad23 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 8 Jun 2012 10:23:37 -0400 Subject: check for a loaded kernel on reboot Explicitly pass "kexec" to the shutdown script if we detect a preloaded kernel already in memory. We mask read errors for custom kernels where kexec is not available. Signed-off-by: Dave Reisner --- rc.shutdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rc.shutdown b/rc.shutdown index d0d8405..78f56c4 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -82,7 +82,12 @@ if [[ -x /run/initramfs/shutdown ]]; then if [[ $RUNLEVEL = 0 ]]; then action="poweroff" else - action="reboot" + { read kexec_loaded /dev/null + if (( kexec_loaded )); then + action="kexec" + else + action="reboot" + fi fi # make /run/initrafs a mount -- cgit v1.2.3 From a6c9a6926840a7e37fe00503305d9d47086963a7 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 8 Jun 2012 10:23:50 -0400 Subject: avoid check for /sys/block This is a deprecated path in sysfs, and the check is illogical. Signed-off-by: Dave Reisner --- rc.shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.shutdown b/rc.shutdown index 78f56c4..c708b92 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -71,7 +71,7 @@ if [[ -f /etc/crypttab ]] && type -p cryptsetup >/dev/null; then stat_done fi -[[ $USELVM = [Yy][Ee][Ss] && -x $(type -P lvm) && -d /sys/block ]] && +[[ $USELVM = [Yy][Ee][Ss] && -x $(type -P lvm) ]] && status "Deactivating LVM2 groups" vgchange --sysinit -a n &>/dev/null run_hook shutdown_poweroff -- cgit v1.2.3 From b4d7c53b80faa2943da48ba9baa3ecfc200965c8 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 11 Jun 2012 01:58:00 +0200 Subject: rc.sysinit: remove warnings These were useful in a transition period, but no need to keep them around. If /usr is not mounted we probably won't even get this far. If devtmpfs is not supported the previous mount of /dev would have given an errormessage. This was prompted by a suggeston from Igor Podlesny to improve on the error handling, which made me realise we could drop it. Signed-off-by: Tom Gundersen --- rc.sysinit | 8 -------- 1 file changed, 8 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 58f3216..906135c 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -38,14 +38,6 @@ 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 "") ;; -- cgit v1.2.3 From dd4843aa1525716c3a9916042f2de472eb0f064c Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 11 Jun 2012 11:27:00 +0200 Subject: PKGBUILD: remove dep on grep We no longer use grep. Suggested-by: Igor Podlesny Signed-off-by: Tom Gundersen --- PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index 6186de5..0c63e59 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,7 +10,7 @@ conflicts=('initscripts') provides=('initscripts=9999') backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown) makedepends=('asciidoc') -depends=('glibc' 'bash' 'grep' 'coreutils' 'systemd-tools' 'iproute2' +depends=('glibc' 'bash' 'coreutils' 'systemd-tools' 'iproute2' 'ncurses' 'kbd' 'findutils' 'sysvinit') optdepends=('net-tools: legacy networking support' 'bridge-utils: Network bridging support' -- cgit v1.2.3