You are not logged in.

#1 2012-07-28 22:33:58

oded
Member
From: Israel
Registered: 2009-08-06
Posts: 26

[SOLVED] rc-local-shutdown.service troubles

Hello,

I'm using /etc/rc-local.shutdown to remove the e1000e and ehci_hcd prior to shutdown (else it reboots).

Using initscripts all is well. I can poweroff and the laptop stays off.
Using systemd, I go through the poweroff procedure and then the laptop turns on,
which indicates there's a problem with the execution of rc-local.shutdown. If I manually rmmod e100e and ehci_hcd and then poweroff, all is well.

I've enabled logging (as suggested on the wiki troubleshooting section): shutdown-log.txt but I can't find anything relevant.

/etc/rc-local.shutdown contents:

#!/bin/bash
#
# /etc/rc.local.shutdown: Local shutdown script.

rmmod e1000e
rmmod ehci_hcd

systemctl status rc-local.shutdown.service output:

rc-local-shutdown.service - /etc/rc.local.shutdown Compatibility
	  Loaded: loaded (/usr/lib/systemd/system/rc-local-shutdown.service; enabled)
	  Active: inactive (dead)
	  CGroup: name=systemd:/system/rc-local-shutdown.service

Thanks!

Last edited by oded (2012-07-29 01:21:30)

Offline

#2 2012-07-29 00:43:47

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: [SOLVED] rc-local-shutdown.service troubles

oded wrote:

Using initscripts all is well. I can poweroff and the laptop stays off.
Using systemd, I go through the poweroff procedure and then the laptop turns on,

My guess is that rc-local-shutdown.service is not getting executed at all, as it accidentally conflicts with shutdown.target.

Could you try this replacement:

[Unit]
Description=/etc/rc.local.shutdown Compatibility
ConditionPathIsExecutable=/etc/rc.local.shutdown
DefaultDependencies=no
After=rc-local.service basic.target
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/etc/rc.local.shutdown
StandardInput=tty
RemainAfterExit=yes

?

If it works I'll include the fix in the next release (where this will all be part of the initscripts pacakge).

Thanks for reporting!

Offline

#3 2012-07-29 01:20:47

oded
Member
From: Israel
Registered: 2009-08-06
Posts: 26

Re: [SOLVED] rc-local-shutdown.service troubles

tomegun wrote:

My guess is that rc-local-shutdown.service is not getting executed at all, as it accidentally conflicts with shutdown.target.

Could you try this replacement:

...

If it works I'll include the fix in the next release (where this will all be part of the initscripts pacakge).

You're right, that was it. With the changes you've suggested everything works well. (:

Thanks for the quick reply!

Offline

#4 2012-07-29 01:33:29

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: [SOLVED] rc-local-shutdown.service troubles

Great. Fix committed to git.

Offline

Board footer

Powered by FluxBB