From cbfce36a16095b9f8155ecfb620e1d6194dcc7e7 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 18 Feb 2014 20:52:28 +0100 Subject: d-s-h: don’t error out when masking a service is not possible because MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /etc/systemd/system/ already exists (but is not a symlink). Closes: #739090 --- script/deb-systemd-helper | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'script') diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper index f6b0fe7..efb6fe3 100755 --- a/script/deb-systemd-helper +++ b/script/deb-systemd-helper @@ -377,8 +377,12 @@ sub mask_service { # If the link already exists, don’t do anything. return if -l $mask_link && readlink($mask_link) eq '/dev/null'; - # Otherwise, error out. - error("$mask_link already exists"); + # If the file already exists, the user most likely copied the .service + # file to /etc/ to change it in some way. In this case we don’t need to + # mask the .service in the first place, since it will not be removed by + # dpkg. + debug "$mask_link already exists, not masking."; + return; } make_path(dirname($mask_link)); -- cgit v1.2.3