Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../95resume
File: parse-resume.sh
#!/bin/sh
[0] Fix | Delete
[1] Fix | Delete
if resume=$(getarg resume=) && ! getarg noresume; then
[2] Fix | Delete
export resume
[3] Fix | Delete
echo "$resume" >/.resume
[4] Fix | Delete
else
[5] Fix | Delete
unset resume
[6] Fix | Delete
fi
[7] Fix | Delete
[8] Fix | Delete
case "$resume" in
[9] Fix | Delete
LABEL=*) \
[10] Fix | Delete
resume="$(echo $resume | sed 's,/,\\x2f,g')"
[11] Fix | Delete
resume="/dev/disk/by-label/${resume#LABEL=}" ;;
[12] Fix | Delete
UUID=*) \
[13] Fix | Delete
resume="/dev/disk/by-uuid/${resume#UUID=}" ;;
[14] Fix | Delete
PARTUUID=*) \
[15] Fix | Delete
resume="/dev/disk/by-partuuid/${resume#PARTUUID=}" ;;
[16] Fix | Delete
PARTLABEL=*) \
[17] Fix | Delete
resume="/dev/disk/by-partlabel/${resume#PARTLABEL=}" ;;
[18] Fix | Delete
esac
[19] Fix | Delete
[20] Fix | Delete
if splash=$(getarg splash=); then
[21] Fix | Delete
export splash
[22] Fix | Delete
else
[23] Fix | Delete
unset splash
[24] Fix | Delete
fi
[25] Fix | Delete
[26] Fix | Delete
case "$splash" in
[27] Fix | Delete
quiet )
[28] Fix | Delete
a_splash="-P splash=y"
[29] Fix | Delete
;;
[30] Fix | Delete
* )
[31] Fix | Delete
a_splash="-P splash=n"
[32] Fix | Delete
;;
[33] Fix | Delete
esac
[34] Fix | Delete
[35] Fix | Delete
[36] Fix | Delete
if ! getarg noresume; then
[37] Fix | Delete
if [ -n "$resume" ]; then
[38] Fix | Delete
wait_for_dev /dev/resume
[39] Fix | Delete
[40] Fix | Delete
{
[41] Fix | Delete
printf "KERNEL==\"%s\", ACTION==\"add|change\", SYMLINK+=\"resume\"\n" \
[42] Fix | Delete
${resume#/dev/};
[43] Fix | Delete
printf "SYMLINK==\"%s\", ACTION==\"add|change\", SYMLINK+=\"resume\"\n" \
[44] Fix | Delete
${resume#/dev/};
[45] Fix | Delete
} >> /etc/udev/rules.d/99-resume-link.rules
[46] Fix | Delete
[47] Fix | Delete
{
[48] Fix | Delete
if [ -x /usr/sbin/resume ]; then
[49] Fix | Delete
printf -- 'KERNEL=="%s", ' "${resume#/dev/}"
[50] Fix | Delete
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
[51] Fix | Delete
printf -- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
[52] Fix | Delete
"$a_splash" "$resume";
[53] Fix | Delete
printf -- 'SYMLINK=="%s", ' "${resume#/dev/}"
[54] Fix | Delete
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
[55] Fix | Delete
printf -- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \
[56] Fix | Delete
"$a_splash" "$resume";
[57] Fix | Delete
fi
[58] Fix | Delete
[59] Fix | Delete
printf -- 'KERNEL=="%s", ' "${resume#/dev/}"
[60] Fix | Delete
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
[61] Fix | Delete
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"'
[62] Fix | Delete
[63] Fix | Delete
printf -- 'SYMLINK=="%s", ' "${resume#/dev/}"
[64] Fix | Delete
printf -- '%s' 'ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
[65] Fix | Delete
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"'
[66] Fix | Delete
} >> /etc/udev/rules.d/99-resume.rules
[67] Fix | Delete
[68] Fix | Delete
printf '[ -e "%s" ] && { ln -fs "%s" /dev/resume 2> /dev/null; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \
[69] Fix | Delete
"$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh
[70] Fix | Delete
[71] Fix | Delete
{
[72] Fix | Delete
printf -- "%s" 'warn "Cancelling resume operation. Device not found.";'
[73] Fix | Delete
printf -- ' cancel_wait_for_dev /dev/resume; rm -f -- "$job" "%s/initqueue/settled/resume.sh";\n' "$hookdir"
[74] Fix | Delete
} >> $hookdir/initqueue/timeout/resume.sh
[75] Fix | Delete
[76] Fix | Delete
mv /lib/dracut/resume.sh /lib/dracut/hooks/pre-mount/10-resume.sh
[77] Fix | Delete
else
[78] Fix | Delete
{
[79] Fix | Delete
if [ -x /usr/sbin/resume ]; then
[80] Fix | Delete
printf -- '%s' 'SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
[81] Fix | Delete
printf -- ' RUN+="/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s $tempnode"\n' "$a_splash"
[82] Fix | Delete
fi
[83] Fix | Delete
printf -- '%s' 'SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="suspend|swsuspend|swsupend",'
[84] Fix | Delete
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"';
[85] Fix | Delete
} >> /etc/udev/rules.d/99-resume.rules
[86] Fix | Delete
fi
[87] Fix | Delete
fi
[88] Fix | Delete
[89] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function