Re: F15 fails to suspend/hibernate on Thinkpad W510+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Darryl L. Pierce wrote:
> On Fri, Jun 24, 2011 at 09:18:14AM -0500, Chris Adams wrote:
>> Once upon a time, Darryl L. Pierce<dpierce@xxxxxxxxxx>  said:
>>> (mcpierce@mcpierce-laptop:~)$ pm-is-supported --suspend
>>> (mcpierce@mcpierce-laptop:~)$ echo $?
>>> 0
>>> (mcpierce@mcpierce-laptop:~)$ pm-is-supported --hibernate
>>> (mcpierce@mcpierce-laptop:~)$ echo $?
>>> 0
>>> (mcpierce@mcpierce-laptop:~)$ pm-is-supported --suspend-hybrid
>>> (mcpierce@mcpierce-laptop:~)$ echo $?
>>> 1
>>>
>>> Though I'm questioning this last once since I tried to do:
>>>
>>> pm-is-supported --suspend-hybrid&&  echo $?
>>>
>>> and it never showed the RC, telling me the command itself failed.
>>
>> Remember: exit code of zero is "success", non-zero is "failure".  It is
>> inverted from common usage, but allows for multiple "failure" exit
>> codes.
>
> Right. The manpage for pm-is-supported says that a 0 exit code means the
> feature _is_ supported, and 1 means it's _not_ supported. So in the
> above case suspend and hibernate are (in theory) supported, yet both
> result in my laptop being non-responsive. And in the last case the fact
> that:
>
> pm-is-supported --suspend-hybrid&&  echo $?
>
> fails to output the exit code tells me the arg is causing
> pm-is-supported itself to fail.
>
You have asked it to display the termination code if it terminates normally. Is 
that what you want? I would think you want to display it when it fails, maybe:
   pm-is-supported --suspend-hybrid && echo Supported || echo "Not supported $?"

Remember zero is good status...

-- 
Bill Davidsen <davidsen@xxxxxxx>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux