|
|
712866 |
From c35826c0e7623852be8735acf8cc13e6bf829208 Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Alexander Tsoy <alexander@tsoy.me>
|
|
|
712866 |
Date: Wed, 9 Oct 2013 07:02:56 +0400
|
|
|
712866 |
Subject: [PATCH] resume: remove resume-genrules.sh
|
|
|
712866 |
|
|
|
712866 |
parse-resume.sh already contains all the code from resume-genrules.sh.
|
|
|
712866 |
Also parse-resume.sh is executed before resume-genrules.sh, so there is
|
|
|
712866 |
no point to keep the latter.
|
|
|
712866 |
|
|
|
712866 |
This fixes the following error messages:
|
|
|
712866 |
dracut-initqueue: ln: failed to create symbolic link '/dev/resume': File exists
|
|
|
712866 |
dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/settled/resume.sh': No such file or directory
|
|
|
712866 |
dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/timeout/resume.sh': No such file or directory
|
|
|
712866 |
---
|
|
|
712866 |
modules.d/95resume/module-setup.sh | 1 -
|
|
|
712866 |
modules.d/95resume/resume-genrules.sh | 51 -----------------------------------
|
|
|
712866 |
2 files changed, 52 deletions(-)
|
|
|
712866 |
delete mode 100755 modules.d/95resume/resume-genrules.sh
|
|
|
712866 |
|
|
|
712866 |
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
|
|
|
5c6c2a |
index a1ddb460..c4e93636 100755
|
|
|
712866 |
--- a/modules.d/95resume/module-setup.sh
|
|
|
712866 |
+++ b/modules.d/95resume/module-setup.sh
|
|
|
712866 |
@@ -30,7 +30,6 @@ install() {
|
|
|
712866 |
inst_hook cmdline 10 "$moddir/parse-resume.sh"
|
|
|
712866 |
else
|
|
|
712866 |
inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh
|
|
|
712866 |
- inst_hook pre-udev 30 "$moddir/resume-genrules.sh"
|
|
|
712866 |
fi
|
|
|
712866 |
|
|
|
712866 |
inst_script "$moddir/resume.sh" /lib/dracut/resume.sh
|
|
|
712866 |
diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh
|
|
|
712866 |
deleted file mode 100755
|
|
|
5c6c2a |
index c542c715..00000000
|
|
|
712866 |
--- a/modules.d/95resume/resume-genrules.sh
|
|
|
712866 |
+++ /dev/null
|
|
|
712866 |
@@ -1,51 +0,0 @@
|
|
|
712866 |
-#!/bin/sh
|
|
|
712866 |
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
|
712866 |
-# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
|
712866 |
-
|
|
|
712866 |
-case "$splash" in
|
|
|
712866 |
- quiet )
|
|
|
712866 |
- a_splash="-P splash=y"
|
|
|
712866 |
- ;;
|
|
|
712866 |
- * )
|
|
|
712866 |
- a_splash="-P splash=n"
|
|
|
712866 |
- ;;
|
|
|
712866 |
-esac
|
|
|
712866 |
-
|
|
|
712866 |
-if [ -n "$resume" ]; then
|
|
|
712866 |
- {
|
|
|
712866 |
- printf "KERNEL==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
|
|
|
712866 |
- ${resume#/dev/};
|
|
|
712866 |
- printf "SYMLINK==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
|
|
|
712866 |
- ${resume#/dev/};
|
|
|
712866 |
- } >> /etc/udev/rules.d/99-resume-link.rules
|
|
|
712866 |
-
|
|
|
712866 |
- {
|
|
|
712866 |
- if [ -x /usr/sbin/resume ]; then
|
|
|
712866 |
- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
|
|
|
712866 |
- ${resume#/dev/} "$a_splash" "$resume";
|
|
|
712866 |
- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
|
|
|
712866 |
- ${resume#/dev/} "$a_splash" "$resume";
|
|
|
712866 |
- fi
|
|
|
712866 |
- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n" \
|
|
|
712866 |
- ${resume#/dev/};
|
|
|
712866 |
- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n" \
|
|
|
712866 |
- ${resume#/dev/};
|
|
|
712866 |
- } >> /etc/udev/rules.d/99-resume.rules
|
|
|
712866 |
-
|
|
|
712866 |
- printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job" "%s/initqueue/timeout/resume.sh"; }\n' \
|
|
|
712866 |
- "$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh
|
|
|
712866 |
-
|
|
|
712866 |
- printf 'warn "Cancelling resume operation. Device not found."; cancel_wait_for_dev /dev/resume; rm "$job" "%s/initqueue/settled/resume.sh";' \
|
|
|
712866 |
- "$hookdir" >> $hookdir/initqueue/timeout/resume.sh
|
|
|
712866 |
-
|
|
|
712866 |
- wait_for_dev "/dev/resume"
|
|
|
712866 |
-
|
|
|
712866 |
-elif ! getarg noresume; then
|
|
|
712866 |
- {
|
|
|
712866 |
- if [ -x /usr/sbin/resume ]; then
|
|
|
712866 |
- printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \$tempnode\"\n" "$a_splash"
|
|
|
712866 |
- fi
|
|
|
712866 |
- echo "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\"," \
|
|
|
712866 |
- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume\"";
|
|
|
712866 |
- } >> /etc/udev/rules.d/99-resume.rules
|
|
|
712866 |
-fi
|