[oe-commits] Mike Westerhof : SlugOS: rename checkroot.sh to checkroot to avoid rcS " sourcing"
GIT User account
git at amethyst.openembedded.net
Sun Jan 25 06:26:02 UTC 2009
Module: openembedded.git
Branch: org.openembedded.dev
Commit: b49e09758de7f29c049c12213347cb32fb64d7a4
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b49e09758de7f29c049c12213347cb32fb64d7a4
Author: Mike Westerhof <mwester at dls.net>
Date: Sun Jan 25 00:22:59 2009 -0600
SlugOS: rename checkroot.sh to checkroot to avoid rcS "sourcing"
SlugOS checkroot script redirects I/O which does not play well
with the new "optimized" rcS behavior, which is to source any
init scripts ending in "sh".
---
.../slugos/{checkroot.sh => checkroot} | 2 +-
.../initscripts-1.0/slugos/domainname.sh | 2 +-
.../initscripts/initscripts-1.0/slugos/mountall.sh | 2 +-
packages/initscripts/initscripts-1.0/slugos/reboot | 2 +-
.../initscripts/initscripts-1.0/slugos/umountfs | 2 +-
.../initscripts-1.0/slugos/umountnfs.sh | 2 +-
packages/initscripts/initscripts-slugos_1.0.bb | 16 +++++++++++++---
7 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh b/packages/initscripts/initscripts-1.0/slugos/checkroot
similarity index 99%
rename from packages/initscripts/initscripts-1.0/slugos/checkroot.sh
rename to packages/initscripts/initscripts-1.0/slugos/checkroot
index 3943f13..31291cd 100644
--- a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh
+++ b/packages/initscripts/initscripts-1.0/slugos/checkroot
@@ -1,4 +1,4 @@
-#
+#!/bin/sh
# checkroot.sh Check to root filesystem.
#
# Version: @(#)checkroot.sh 2.84 25-Jan-2002 miquels at cistron.nl
diff --git a/packages/initscripts/initscripts-1.0/slugos/domainname.sh b/packages/initscripts/initscripts-1.0/slugos/domainname.sh
index 7113467..e12de0e 100644
--- a/packages/initscripts/initscripts-1.0/slugos/domainname.sh
+++ b/packages/initscripts/initscripts-1.0/slugos/domainname.sh
@@ -1,4 +1,4 @@
-#
+#!/bin/sh
# domainname.sh Set the domainname.
#
test -r /etc/defaultdomain &&
diff --git a/packages/initscripts/initscripts-1.0/slugos/mountall.sh b/packages/initscripts/initscripts-1.0/slugos/mountall.sh
index 3a155d1..1ae02df 100644
--- a/packages/initscripts/initscripts-1.0/slugos/mountall.sh
+++ b/packages/initscripts/initscripts-1.0/slugos/mountall.sh
@@ -1,4 +1,4 @@
-#
+#!/bin/sh
# mountall.sh Mount all filesystems.
#
# Version: @(#)mountall.sh 2.83-2 01-Nov-2001 miquels at cistron.nl
diff --git a/packages/initscripts/initscripts-1.0/slugos/reboot b/packages/initscripts/initscripts-1.0/slugos/reboot
index cb0979f..f98b87f 100755
--- a/packages/initscripts/initscripts-1.0/slugos/reboot
+++ b/packages/initscripts/initscripts-1.0/slugos/reboot
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
#
# reboot Execute the reboot command.
#
diff --git a/packages/initscripts/initscripts-1.0/slugos/umountfs b/packages/initscripts/initscripts-1.0/slugos/umountfs
index d6f432d..5580d7b 100644
--- a/packages/initscripts/initscripts-1.0/slugos/umountfs
+++ b/packages/initscripts/initscripts-1.0/slugos/umountfs
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
#
# umountfs Turn off swap and unmount all local filesystems.
#
diff --git a/packages/initscripts/initscripts-1.0/slugos/umountnfs.sh b/packages/initscripts/initscripts-1.0/slugos/umountnfs.sh
index 994a919..6ff83e5 100644
--- a/packages/initscripts/initscripts-1.0/slugos/umountnfs.sh
+++ b/packages/initscripts/initscripts-1.0/slugos/umountnfs.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
#
# umountnfs.sh Unmount all network filesystems.
#
diff --git a/packages/initscripts/initscripts-slugos_1.0.bb b/packages/initscripts/initscripts-slugos_1.0.bb
index 41b1e97..ba1b97e 100644
--- a/packages/initscripts/initscripts-slugos_1.0.bb
+++ b/packages/initscripts/initscripts-slugos_1.0.bb
@@ -16,7 +16,7 @@ RDEPENDS = ""
# All other standard definitions inherited from initscripts
# Except the PR which is hacked here. The format used is
# a suffix
-PR := "${PR}.16"
+PR := "${PR}.17"
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
@@ -26,18 +26,28 @@ SRC_URI += "file://alignment.sh"
SRC_URI += "file://domainname.sh"
SRC_URI += "file://devices.patch;patch=1"
SRC_URI += "file://bootclean.sh"
+SRC_URI += "file://checkroot"
-# Without this it is not possible to patch checkroot.sh
+# Without this it is not possible to patch checkroot
S = "${WORKDIR}"
do_install_append() {
# the image build command now installs this for slugos
rm ${D}${sysconfdir}/device_table
+ # Ugly - we need to get rid of the checkroot.sh
+ # that was installed by initscript-1.0.bb; the new
+ # rcS script will "source" files that end in .sh,
+ # and that messes up our checkroot.sh script (due
+ # to redirection issues. We need to use only our
+ # checkroot, without the ".sh" suffix.
+ rm -f ${D}${sysconfdir}/init.d/checkroot.sh
+
# slugos specific scripts
install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/domainname.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/bootclean.sh ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/checkroot ${D}${sysconfdir}/init.d
# Remove the do install links (this detects a change to the
# initscripts .bb file - it will cause a build failure here.)
@@ -104,7 +114,7 @@ do_install_append() {
# busybox hwclock.sh (slugos-init) starts here (08)
# slugos-init umountinitrd runs here (09)
- update-rc.d -r ${D} checkroot.sh start 10 S .
+ update-rc.d -r ${D} checkroot start 10 S .
# slugos buffer syslog starts here (11)
# sysconfsetup runs at S 12
# modutils.sh runs at S 20
More information about the Openembedded-commits
mailing list