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

Bug#796627: live-tools: Has init script in runlevel S but no matching service file



Hi

On Sat, 22 Aug 2015 22:32:00 -0300 fsateler@debian.org wrote:
> Hi,
>
> Your package live-tools has an initscript that is enabled in runlevel
> S, but it does not provide a corresponding systemd service unit.

The init script in question reads:

===
case "${1}" in
       stop)
               if [ -e /bin/live-media-eject ]
               then
                       /bin/live-media-eject ${@}
               fi
               ;;

       start|force-reload|restart)

               ;;
esac
===

And yet, there is no live-media-eject binary nowhere to be found.

Turns out, that binary was renamed from live-media-eject to
live-medium-eject  on commit e5818b5, which precedes release 4.0.2,
and thus is not present in jessie. This means this particular script
is always a noop in jessie and later.

Maybe this script can be removed altogether?

If the script is useful, I suggest the following (untested) service file:

===
[Unit]
Description=Live System Support Scripts
DefaultDependencies=no
After=local-fs.target
Conflicts=shutdown.target
Before=shutdown.target sysinit.target
ConditionKernelCommandLine=boot=live
ConditionKernelCommandLine=!root=/dev/nfs
ConditionKernelCommandLine=!root=/dev/cifs
ConditionKernelCommandLine=!find_iso
ConditionKernelCommandLine=!toram
ConditionKernelCommandLine=!netboot
ConditionKernelCommandLine=!cdrom-detect/eject=false
ConditionKernelCommandLine=!noeject

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/bin/live-medium-eject stop
TimeoutSec=infinity

[Install]
WantedBy=sysinit.target
===

Although I don't think the prompting can work under systemd without
using plymouth.

-- 
Saludos,
Felipe Sateler


Reply to: