diff options
author | Matthias Hentges <oe@hentges.net> | 2007-06-05 02:14:10 +0000 |
---|---|---|
committer | Matthias Hentges <oe@hentges.net> | 2007-06-05 02:14:10 +0000 |
commit | 3b4e0de68ce0bae4ebb74bd11e4ccd4f7d55e6f8 (patch) | |
tree | 74311da3216cd5c2f5e5f0b443e39e1b70e0ade3 /packages/initscripts | |
parent | 6a15ac28b6759ab48fd903b46becd2c9203ed781 (diff) |
initscripts: mountall.sh: Create roots home directory on boot if it is missing, closing bug 2109
Diffstat (limited to 'packages/initscripts')
-rwxr-xr-x | packages/initscripts/initscripts-1.0/mountall.sh | 12 | ||||
-rw-r--r-- | packages/initscripts/initscripts_1.0.bb | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/packages/initscripts/initscripts-1.0/mountall.sh b/packages/initscripts/initscripts-1.0/mountall.sh index b5cb85a1e9..65d5d26b24 100755 --- a/packages/initscripts/initscripts-1.0/mountall.sh +++ b/packages/initscripts/initscripts-1.0/mountall.sh @@ -41,5 +41,17 @@ then swapon -a 2> /dev/null fi +# A missing homedirectory for root can cause all sorts of problems. +# This can happen after user formats his /home partition for example + +if test -e /etc/passwd +then + ROOT_HOME="`cat /etc/passwd|grep ^root | awk '{split($0,x,":");printf("%s\n",x[6])}'`" + + if test -n "$ROOT_HOME" + then + ! test -d "$ROOT_HOME" && mkdir -p "$ROOT_HOME" + fi +fi : exit 0 diff --git a/packages/initscripts/initscripts_1.0.bb b/packages/initscripts/initscripts_1.0.bb index d814e937db..f979a50c27 100644 --- a/packages/initscripts/initscripts_1.0.bb +++ b/packages/initscripts/initscripts_1.0.bb @@ -4,7 +4,7 @@ PRIORITY = "required" DEPENDS = "makedevs" RDEPENDS = "makedevs" LICENSE = "GPL" -PR = "r91" +PR = "r92" SRC_URI = "file://halt \ file://ramdisk \ |