[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/7] initscripts: Only run rootcheck on Linux
From: |
Justus Winter |
Subject: |
[PATCH 5/7] initscripts: Only run rootcheck on Linux |
Date: |
Thu, 15 Aug 2013 09:45:32 +0200 |
Neither kFreeBSD nor Hurd have /dev/root and the device ids used here
are specific to Linux. Note that fsck is still run, rootcheck refers
to the check whether the root device in /etc/fstab matches the actual
device.
---
debian/changelog | 2 ++
debian/src/initscripts/etc/init.d/checkroot.sh | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 743e77e..ce16030 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -58,6 +58,8 @@ sysvinit (2.88dsf-42) UNRELEASED; urgency=low
* debian/control: Depend on a recent hurd package on hurd-any. The
initscripts require some functionality that has been implemented
only recently.
+ * checkroot.sh: Only run rootcheck on Linux. Neither kFreeBSD nor Hurd
+ have /dev/root and the device ids used here are specific to Linux.
-- Roger Leigh <rleigh@debian.org> Sat, 04 May 2013 13:13:51 +0100
diff --git a/debian/src/initscripts/etc/init.d/checkroot.sh
b/debian/src/initscripts/etc/init.d/checkroot.sh
index 3bf506b..4f00eb2 100755
--- a/debian/src/initscripts/etc/init.d/checkroot.sh
+++ b/debian/src/initscripts/etc/init.d/checkroot.sh
@@ -84,7 +84,11 @@ do_start () {
# If not we try to use the /dev/root alias device, and if that
# fails we create a temporary node in /run.
#
- if [ "$rootcheck" = yes ]
+ # Do this only on Linux. Neither kFreeBSD nor Hurd have
+ # /dev/root and the device ids used here are specific to
+ # Linux.
+ KERNEL="$(uname)"
+ if [ "$rootcheck" = yes ] && [ "$KERNEL" = Linux ]
then
ddev="$(mountpoint -qx $rootdev)"
rdev="$(mountpoint -d /)"
--
1.7.10.4
- patches for sysvinit (2), Justus Winter, 2013/08/15
- [PATCH 1/7] initscripts: hurd has a proper tmpfs now, remove workaround, Justus Winter, 2013/08/15
- [PATCH 2/7] initscripts: add -ocompatible to procfs mounts on Hurd, Justus Winter, 2013/08/15
- [PATCH 3/7] initscripts: use pidof -s /sbin/init for robustness, Justus Winter, 2013/08/15
- [PATCH 6/7] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS., Justus Winter, 2013/08/15
- [PATCH 4/7] initscripts: add runsystem.sysv, Justus Winter, 2013/08/15
- [PATCH 5/7] initscripts: Only run rootcheck on Linux,
Justus Winter <=
- [PATCH 7/7] sysvinit: Fix getty path in /etc/inittab on Hurd., Justus Winter, 2013/08/15
- Re: patches for sysvinit (2), Samuel Thibault, 2013/08/28