resume/parse-resume.sh: fixed printf formatting
https://bugzilla.redhat.com/show_bug.cgi?id=1045704master
parent
5db9c5c1d9
commit
df6e79bfd2
|
|
@ -48,39 +48,41 @@ if ! getarg noresume; then
|
|||
|
||||
{
|
||||
if [ -x /usr/sbin/resume ]; then
|
||||
printf -- "KERNEL==\"%s\", " "${resume#/dev/}"
|
||||
printf -- "ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\","
|
||||
printf -- 'KERNEL=="%s", ' "${resume#/dev/}"
|
||||
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
|
||||
printf -- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
|
||||
"$a_splash" "$resume";
|
||||
printf -- "SYMLINK==\"%s\", " "${resume#/dev/}"
|
||||
printf -- "ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\","
|
||||
printf -- 'SYMLINK=="%s", ' "${resume#/dev/}"
|
||||
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
|
||||
printf -- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
|
||||
"$a_splash" "$resume";
|
||||
fi
|
||||
printf -- "KERNEL==\"%s\", " ${resume#/dev/};
|
||||
printf -- "ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\","
|
||||
printf -- "%s" " RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n"
|
||||
printf -- "SYMLINK==\"%s\", " ${resume#/dev/};
|
||||
printf -- "%s" "ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\","
|
||||
printf -- "%s" " RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n"
|
||||
|
||||
printf -- 'KERNEL=="%s", ' "${resume#/dev/}"
|
||||
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
|
||||
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"'
|
||||
|
||||
printf -- 'SYMLINK=="%s", ' "${resume#/dev/}"
|
||||
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
|
||||
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"'
|
||||
} >> /etc/udev/rules.d/99-resume.rules
|
||||
|
||||
printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \
|
||||
"$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh
|
||||
|
||||
printf -- "%s" 'warn "Cancelling resume operation. Device not found.";'
|
||||
printf -- ' cancel_wait_for_dev /dev/resume; rm -f -- "$job" "%s/initqueue/settled/resume.sh";' \
|
||||
printf -- ' cancel_wait_for_dev /dev/resume; rm -f -- "$job" "%s/initqueue/settled/resume.sh";\n' \
|
||||
"$hookdir" >> $hookdir/initqueue/timeout/resume.sh
|
||||
|
||||
mv /lib/dracut/resume.sh /lib/dracut/hooks/pre-mount/10-resume.sh
|
||||
else
|
||||
{
|
||||
if [ -x /usr/sbin/resume ]; then
|
||||
printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\","
|
||||
printf -- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \$tempnode\"\n" "$a_splash"
|
||||
printf -- '%s' 'SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
|
||||
printf -- ' RUN+="/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s $tempnode"\n' "$a_splash"
|
||||
fi
|
||||
printf -- "%s" "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\","
|
||||
printf -- "%s" " RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume\"";
|
||||
printf -- '%s' 'SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
|
||||
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"';
|
||||
} >> /etc/udev/rules.d/99-resume.rules
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue