Bug 754252

Summary: Shell error in at-3.1.13-4.fc16.x86_64 /usr/lib64/pm-utils/sleep.d/56atd
Product: [Fedora] Fedora Reporter: Alex <alex.vizor>
Component: atAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: jcm, jfeeney, mmaslano, sven
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-16 17:25:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Alex 2011-11-15 20:49:44 UTC
There is is shell error here is diff to fix it:
--- /usr/lib64/pm-utils/sleep.d/56atd   2011-11-14 13:09:53.000000000 +0300
+++ 56atd       2011-11-15 23:46:53.484899900 +0300
@@ -7,9 +7,10 @@
        hibernate|suspend)
                ;;
        thaw|resume)
-               if [ -f /etc/init.d/atd ]; then
+               if [ -f /etc/init.d/atd ]
+               then
                        /etc/init.d/atd restart
-               elif
+               else
                        systemctl try-restart atd.service
                fi
                ;;

Comment 1 Jon Masters 2011-11-16 11:39:57 UTC
I just reported this same issue to the test list, having rediscovered it.

Jon.

Comment 2 Matthew Garrett 2011-11-16 14:18:56 UTC
What is this script even meant to be doing? Why does at want to be restarted after suspend?

Comment 3 Marcela Mašláňová 2011-11-16 16:13:07 UTC
(In reply to comment #2)
> What is this script even meant to be doing? Why does at want to be restarted
> after suspend?

The script is based on bug #464393. 

It should be condrestart for sysvinit, but that doesn't matter now, because upstart can be hardly used in Fedora.

Comment 4 Matthew Garrett 2011-11-16 16:37:27 UTC
atd really needs to handle this case itself without relying on being restarted. The easiest approach is probably to get rid of the sleeps and use POSIX timers instead.

Comment 5 Marcela Mašláňová 2011-11-16 17:25:38 UTC

*** This bug has been marked as a duplicate of bug 754156 ***

Comment 6 Jon Masters 2011-11-18 20:02:56 UTC
Much more to the point, it ought to be impossible for an update breaking suspend to land in even rawhide. There should be a process in place to catch that and prevent the package going out.

Comment 7 Matthew Garrett 2011-11-18 20:14:47 UTC
http://fedoraproject.org/wiki/AutoQA