[Mageia-dev] Anyone know where /usr/bin/shutdown comes from?

Colin Guthrie mageia at colin.guthr.ie
Sat Sep 8 12:01:12 CEST 2012


'Twas brillig, and Charles A Edwards at 07/09/12 23:16 did gyre and gimble:
> On Fri, 07 Sep 2012 20:08:53 +0200
> Olivier Blin wrote:
> 
>>> Not owned by any package so presumably it's from a %post or similar.
>>> Anyone know which package or a way to easily search for it?  
>>
>> Looks like it's created by msec, see /usr/share/msec/plugins/msec.py:
>>     shutdown.exists() or shutdown.symlink(CONSOLE_HELPER)
>>
>> And from "rpm -q --scripts usermode":
>>
>> postinstall scriptlet (using /bin/sh):
>> if [ ! -z "$SECURE_LEVEL" ];then
>> if [ -x /usr/sbin/msec -a "$SECURE_LEVEL" -gt "3" ]; then
>> /usr/sbin/msec $SECURE_LEVEL || true ; fi
>> fi
> 
> 
> Yep.
> 
> If you look at the file type it's a symlink to consolehelper.
> If called as user it will require root passwd to run.


Ahh nice, thanks for the replies. msec indeed.

We can now replace this symlink with a direct link to systemctl and
policy kit should take care of things. Seems odd that shutdown was
affected by msec, but halt, reboot and poweroff were not. Seems kinda
pointless and a mis-feature really.

As it never really worked, I'll kill it from msec and just ship it
statically. If this msec feature is needed/desirable then it'll need to
be re-implemented as an automatic edit of the policykit policy.

Col


-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list