summaryrefslogtreecommitdiff
path: root/script
AgeCommit message (Collapse)AuthorFilesLines
2013-09-19Store masked state to respect user’s maskingdebian/1.10Michael Stapelberg1-0/+20
We cannot just unconditionally unmask services on installation time, otherwise “systemctl mask” executed by the user will be reversed. To that end, files in /var/lib/systemd/deb-systemd-helper-masked/ signal that d-s-h masked the service and is allowed to unmask it.
2013-09-19update changelog, bump dependency on i-s-hMichael Stapelberg1-1/+1
2013-09-19Fix mask/unmask implementation (Thanks Michael Biebl)Michael Stapelberg1-51/+23
Turns out that I mistakenly linked the same symlinks to /dev/null that one would normally link to the service file, but mask links are orthogonal to that. As an example, for rsyslog.service, the mask link is /etc/systemd/system/rsyslog.service -> /dev/null, not /etc/systemd/system/mult-user.targe.wants/rsyslog.service fixes #714903
2013-09-19d-s-h: add safety check for unmaskMichael Stapelberg1-1/+5
2013-09-18bump dependency on i-s-hdebian/1.9Michael Stapelberg1-1/+1
2013-09-15use the state file contents for mask/unmaskMichael Stapelberg1-6/+8
This is necessary because when removing, the original service file might not be around anymore.
2013-09-15d-s-h: implement mask and unmask commandsMichael Stapelberg1-5/+77
2013-09-14dh_systemd_enable: skip unit files without an [Install] sectionMichael Stapelberg1-0/+18
fixes #721241
2013-09-12Bugfix: create files with permission 0644Michael Stapelberg1-0/+2
fixes #722524
2013-08-27dh_systemd_enable: document debian/package.{service,tmpfile}Michael Stapelberg1-0/+17
While these files are installed in dh_installinit for historic reasons, many people are looking for documentation in dh_systemd_enable. And they are not completely wrong, since dh_systemd_enable needs to install these files anyway, and will be the only script to do so in the future.
2013-07-25bump dependency on i-s-hdebian/1.8Michael Stapelberg1-1/+1
2013-07-24deb-systemd-helper: support --quiet for (is|was)-enabledMichael Stapelberg1-2/+2
2013-07-24deb-systemd-helper: fix exit code for was-enabledMichael Stapelberg1-0/+1
2013-07-24dh_systemd_enable: use basename of the unit filesMichael Stapelberg1-2/+3
2013-07-24refactor state file reading, dump entries for debuggingMichael Stapelberg1-23/+23
2013-07-24DRY: introduce dsh_state_path(), use $dsh_state as consistent variable nameMichael Stapelberg1-32/+36
2013-07-24update files atomically to be more robust when being cancelledMichael Stapelberg1-15/+33
2013-07-24dh_systemd_enable: deal with changes in the [Install] sectionMichael Stapelberg1-4/+6
autoscripts/postinst-systemd-dont-enable now uses update-state instead of enable/disable which fixes accidental re-disabling of services. Both autoscripts call enable to create new symlinks, if necessary. Both autoscripts call update-state in case the service is not enabled in order to update the state file so that all service files will be removed on purge. See also http://bugs.debian.org/#717603
2013-07-24refactor; implement update-stateMichael Stapelberg1-49/+83
2013-07-24Bugfix: Open the file for reading and appending, seek to the beginningMichael Stapelberg1-1/+2
Otherwise, duplicate entries will end up in the state file. This bugfix was brought to you by the new test suite \o/.
2013-07-23deb-systemd-helper: implement debian-installed commandMichael Stapelberg1-2/+19
2013-07-23deb-systemd-helper: implement was-enabledMichael Stapelberg1-1/+45
2013-07-23remove inaccurate statement about systemctl requiring a running systemdMichael Stapelberg1-2/+1
2013-07-15Fix syntax error in dh_systemd_startdebian/1.6Michael Stapelberg1-1/+0
2013-07-14bump dependency on i-s-h for --quietdebian/1.5Michael Stapelberg1-1/+1
2013-07-14dh_systemd_start: add --no-startMichael Stapelberg1-1/+7
2013-07-14dh_systemd_enable: add --no-enable, deb-systemd-helper: add --quietMichael Stapelberg2-5/+27
The latter is necessary to make the former work without confusing users :).
2013-07-01deb-systemd-helper: clean up /var/lib/systemd/deb-systemd-helper-enabled and ↵Michael Stapelberg1-0/+22
/etc/systemd to pass a piuparts run.
2013-06-27update changelog, bump dependency in dh_systemd_enabledebian/1.4Michael Stapelberg1-1/+1
2013-06-27Bugfix: ensure state directory exists before writing to it (Thanks uau, bigon)Michael Stapelberg1-0/+1
2013-06-26deb-systemd-invoke: remove wrong documentation (copy & paste mistake)Michael Stapelberg1-5/+0
2013-06-19document debug env variableMichael Stapelberg1-0/+12
2013-06-19dh_systemd_enable: bump dependency on init-system-helper to make bugfixes ↵Michael Stapelberg1-1/+1
available
2013-06-19deb-systemd-helper: always store .dsh-also state, not only when creating linksMichael Stapelberg1-4/+18
2013-06-19deb-systemd-helper: delete state file on remove if user didn’t disable serviceMichael Stapelberg1-2/+6
This makes dpkg -i, dpkg -r, dpkg -i work correctly. Before, the user would end up with a disabled service.
2013-06-19deb-systemd-handler: replicate /etc/systemd/system in state dirMichael Stapelberg1-45/+35
…instead of using the basename of the file. The state handling got really messy, so this commit cleans it up. Also, introduce a debug mechanism by looking for _DEB_SYSTEMD_HELPER_DEBUG=1 in the environment.
2013-06-19deb-systemd-helper: also remove statefiles when the service is disabledMichael Stapelberg1-1/+23
This will most likely change with the next commit, but makes things better for now.
2013-06-19add deb-systemd-invoke, a wrapper which respects (basic) policy.dMichael Stapelberg1-0/+85
2013-06-18dh_systemd_start: don’t start the same unit multiple timesMichael Stapelberg1-1/+1
2013-06-18error message: add whitespaces after dotsMichael Stapelberg1-2/+2
2013-06-18depend on init-system-helpers >= 1.2 due to behavioral changesMichael Stapelberg1-1/+1
2013-06-18remove dh_systemd_disable, this edge case will be handled in maintscriptsMichael Stapelberg2-201/+3
To clarify: the edge case is that there is a socket-activated service which has a name for the .socket file that diverges from the basename of the init script. In our case, that is syslog.socket vs. /etc/init.d/rsyslog.
2013-06-18dh_systemd_{enable,disable}: don’t pass Also= and Alias= units on the cmdlineMichael Stapelberg2-112/+4
See previous commit.
2013-06-18deb-systemd-helper: store which files are enabled, disable them when disablingMichael Stapelberg1-15/+31
This allows us to not specify Also= and Alias= units on the commandline (e.g. deb-systemd-helper disable avahi-daemon.service \ avahi-daemon.socket dbus-org.freedesktop.Avahi.service). We want to have this as it is consistent with what systemctl does.
2013-06-18dh_systemd_start: strip .socket (like .service) when looking for sysv scriptsMichael Stapelberg1-1/+1
2013-06-17make --disable-in-prerm keep the postrm autoscript (works in addition now)Michael Stapelberg1-5/+5
This is necessary because otherwise the deletion of state files at purge time is not run.
2013-06-17deb-systemd-helper: only remove state file on purgeMichael Stapelberg1-2/+7
2013-06-17refactor step 6: split functionality into dh_systemd_{enable,disable}Michael Stapelberg2-160/+16
2013-06-17refactor step 5: split off dh_systemd_disableMichael Stapelberg1-0/+308
2013-06-17dh_systemd_enable: add --disable-in-prerm, add autoscript() hackMichael Stapelberg1-2/+82