Summary: | Use 'shutdown -p now' by default | ||
---|---|---|---|
Product: | [Unmaintained] kdm | Reporter: | Arjan van Leeuwen <avleeuwen> |
Component: | general | Assignee: | kdm bugs tracker <kdm-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | wishlist | CC: | webmaster |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | FreeBSD Ports | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Enable shutdown -p on BSD style systems. |
Description
Arjan van Leeuwen
2004-02-07 17:43:23 UTC
yeah ... one problem though: -p is non-standard, so some systems may not grok it at all ... that needs some support check. Subject: Re: Use 'shutdown -p now' by default
Am Samstag 07 Februar 2004 17:46 schrieb Oswald Buddenhagen:
> yeah ... one problem though: -p is non-standard, so some systems may not
> grok it at all ... that needs some support check.
I suggest though not to try from configure if shutdown returns when called
with -p now :)
Greetings, Stephan
If the configuration option that disappeared from kcm_kdm would make a reappearance (see Bug 74463) , none of this would be necessary, uses could just change it once and keep it that way (and yes, the freebsd port of kdebase will finally not overwrite kdmrc with a generic default anymore starting with its next revision ;-)). Btw, just what "standards" should shutdown(8) comply to? AFAIK, POSIX doesn't deal with it, nor with halt, or even init. indeed ... how good that the option is not gone, only the gui. i for one never had problems with it being there, so it can return as far as i'm concerned ... anyway, i'd still prefer to have it set up automatically. hard-coding oses and os versions is ugly ... does somebody have a better idea? is there a "poweroff" binary on these systems? as for standards, there is more than posix. maybe SUSv2 deals with it. that's irrelevant anyway, as -r and -h are at least de-facto standard. ok, how about just using "shutdown -p now || shutdown -h now"? Sounds like a good idea. won't fix. reasons: - i really have no idea how to auto-detect it. parsing the man page is sort of no acceptable solution - trying several commands in series is ... ugly - the gui option is back, so why bother Created attachment 21437 [details]
Enable shutdown -p on BSD style systems.
Please conside this patch.
You already have a #ifdef BSD, but it's not actually defined anywhere.
You do however, have #define BSD_INIT if /etc/ttys exists but this isn't used
anywhere.
This patch just changes #elif BSD to #elif BSD_INIT then uses the -p option,
which all the BSD's should support.
> You already have a #ifdef BSD, but it's not actually defined anywhere. > #include <sys/param.h> > all the BSD's should support > you mean "all sufficiently recent open BSDs". |