]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
usrmount: do not install, if /sbin/init does not live in /usr
authorHarald Hoyer <harald@redhat.com>
Wed, 24 Jul 2013 11:41:15 +0000 (13:41 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 24 Jul 2013 11:41:57 +0000 (13:41 +0200)
modules.d/98usrmount/module-setup.sh

index 5d81d152a7137c9a8ffd1c467480bdc86d1b9bb6..a6680693e1cc4c54cfc105926416ffe541586795 100755 (executable)
@@ -3,7 +3,10 @@
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
 check() {
+    local _init
     [[ $mount_needs ]] && return 1
+    _init=$(readlink -f /sbin/init)
+    [[ "$init" == "${init##/usr}" ]] && return 255
     return 0
 }