]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
resume: only install hostonly files, if in hostonly mode
authorHarald Hoyer <harald@redhat.com>
Fri, 27 Jun 2014 10:47:56 +0000 (12:47 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 30 Jun 2014 10:03:12 +0000 (12:03 +0200)
modules.d/95resume/module-setup.sh

index b1b4684b763f9b5d64905e673333f6aad05a0fc9..b964b3e21beff7682330a7d81c5c2c8bd5924f42 100755 (executable)
@@ -30,15 +30,17 @@ cmdline() {
 install() {
     local _bin
 
-    cmdline  >> "${initdir}/etc/cmdline.d/95resume.conf"
-    echo  >> "${initdir}/etc/cmdline.d/95resume.conf"
+    if [[ $hostonly_cmdline == "yes" ]]; then
+        cmdline  >> "${initdir}/etc/cmdline.d/95resume.conf"
+        echo  >> "${initdir}/etc/cmdline.d/95resume.conf"
+    fi
 
     # Optional uswsusp support
     for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume
     do
         [[ -x "${_bin}" ]] && {
             inst "${_bin}" /usr/sbin/resume
-            [[ -f /etc/suspend.conf ]] && inst /etc/suspend.conf
+            [[ $hostonly ]] && [[ -f /etc/suspend.conf ]] && inst -H /etc/suspend.conf
             break
         }
     done