summaryrefslogtreecommitdiff
path: root/package/base-files/src
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-10 12:16:29 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-10 12:16:29 +0200
commita7734d41b583d39dd521438d4de292f8c531557c (patch)
treeb1fe44f94490c20371ae2c2c8f665f39b06284f6 /package/base-files/src
parentf58884abc002ffd7b9b7d36bd32231fa4ba7542d (diff)
avoid automount of root disk partitions in mdev script
Diffstat (limited to 'package/base-files/src')
-rwxr-xr-xpackage/base-files/src/etc/init.d/fs4
-rwxr-xr-xpackage/base-files/src/etc/mdev/fs17
2 files changed, 13 insertions, 8 deletions
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
index 8bde402ec..2054d5426 100755
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/src/etc/init.d/fs
@@ -18,14 +18,14 @@ for part in $rootparts; do
fstype=$(grep "^$part" /etc/fstab|awk '{ print $3 }')
mnt=$(grep "^$part" /etc/fstab|awk '{ print $2 }')
[ -x /usr/sbin/fsck.$fstype ] && {
- logger -t fs -s "Checking $fstype filesystem on $part"
+ logger -s "Checking $fstype filesystem on $part"
fsck -p -t $fstype $part
}
grep $fstype /proc/filesystems >/dev/null 2>&1
if [ $? -eq 0 ];then
mount $mnt
else
- logger -t fs -s "Filesystem $fstype not in kernel"
+ logger -s "Filesystem $fstype not in kernel"
exit 1
fi
done
diff --git a/package/base-files/src/etc/mdev/fs b/package/base-files/src/etc/mdev/fs
index c50857964..cbb031453 100755
--- a/package/base-files/src/etc/mdev/fs
+++ b/package/base-files/src/etc/mdev/fs
@@ -1,4 +1,9 @@
#!/bin/sh
+# skip root disk here, will be handled in /etc/init.d/fs
+rootdisk=$(readlink /dev/root)
+if [ ${rootdisk} = ${MDEV} ];then
+ exit 0
+fi
uuid=$(blkid /dev/${MDEV} | sed -n '/^.*UUID="\([^"]*\)".*$/s//\1/p')
if [ -z $uuid ];then
fs=$(grep "^/dev/${MDEV}[[:blank:]]" /etc/fstab | awk '{ print $3 }')
@@ -10,7 +15,7 @@ else
disk="${MDEV} (${uuid})"
fi
if [ -z $fs ];then
- logger -t fs -s "Disk $disk not registered in /etc/fstab"
+ logger -s "Disk $disk not registered in /etc/fstab"
exit 0
fi
@@ -22,7 +27,7 @@ fi
# filesystem check
adk_fsck() {
[ -x /usr/sbin/fsck.$fs ] && {
- logger -t fs -s "Checking $fs filesystem on $disk"
+ logger -s "Checking $fs filesystem on $disk"
fsck -p -t $fs ${MDEV}
}
}
@@ -32,19 +37,19 @@ adk_mount() {
mkdir -p $mnt >/dev/null 2>&1
grep $procfs /proc/filesystems >/dev/null 2>&1
if [ $? -eq 0 ];then
- logger -t fs -s "Mounting $disk to $mnt"
+ logger -s "Mounting $disk to $mnt"
mount $mnt
if [ $? -ne 0 ];then
- logger -t fs -s "Mounting $disk failed"
+ logger -s "Mounting $disk failed"
fi
else
- logger -t fs -s "Required filesystem $procfs not available"
+ logger -s "Required filesystem $procfs not available"
fi
}
case "${ACTION}" in
add)
- logger -t fs -s "Device ${MDEV} added to the system"
+ logger -s "Device ${MDEV} added to the system"
adk_fsck
adk_mount
;;