diff -Nru sysvinit-2.88dsf/debian/changelog sysvinit-2.88dsf/debian/changelog --- sysvinit-2.88dsf/debian/changelog 2014-12-18 19:01:15.000000000 +0000 +++ sysvinit-2.88dsf/debian/changelog 2015-01-07 13:00:22.000000000 +0000 @@ -1,3 +1,12 @@ +sysvinit (2.88dsf-53.2ubuntu4) vivid; urgency=medium + + * debian/src/sysv-rc/sbin/invoke-rc.d: + Support upgrading upstart-only job when the machine is already running + systemd as pid 1. This prevents the older prerm to fail due to no + .service or init script installed available for stopping. + + -- Didier Roche Wed, 07 Jan 2015 13:49:28 +0100 + sysvinit (2.88dsf-53.2ubuntu3) vivid; urgency=medium * debian/initscripts.postinst: Create /dev/shm directory with 1777 diff -Nru sysvinit-2.88dsf/debian/src/sysv-rc/sbin/invoke-rc.d sysvinit-2.88dsf/debian/src/sysv-rc/sbin/invoke-rc.d --- sysvinit-2.88dsf/debian/src/sysv-rc/sbin/invoke-rc.d 2014-11-10 16:22:37.000000000 +0000 +++ sysvinit-2.88dsf/debian/src/sysv-rc/sbin/invoke-rc.d 2015-01-07 12:54:09.000000000 +0000 @@ -566,6 +566,18 @@ # new or updated sysv init script was installed. Reload daemon to # pick up any changes. systemctl daemon-reload + + # On system which already run on systemd, support upgrade for + # packages containing only an upstart only job: we don't proceed any + # action to avoid the previous prerm to fail on upgrade, + # as there is no running job to stop or restart. + _state=$(systemctl -p LoadState show "${UNIT}" 2>/dev/null) + if [ "$_state" = "LoadState=not-found" ] && [ -e "/etc/init/${INITSCRIPTID}.conf" ]; t +hen + printerror ${UNIT} doesn\'t exist but the upstart job does. Nothing to start or st +op until a systemd or init job is present. + exit 0 + fi fi case $saction in start|stop|restart|status)