Package: dh-systemd Version: 1.33 Severity: normal Tags: patch Dear Maintainer,
The .init file produced by systemd2init always has default values for every field, EG. DESC= and DAEMON=/usr/sbin/\$NAME This appears to be caused by the script (via augtool) checking 2 non-existing locations for the systemd unit file. The attached patch fixes the issue for me, but I haven't tested it on a Redhat machine (which the script also accommodates). -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.5.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dh-systemd depends on: ii debhelper 9.20160403 ii perl 5.22.2-1 dh-systemd recommends no packages. Versions of packages dh-systemd suggests: ii augeas-tools 1.2.0-0.3 -- no debconf information
--- a/systemd2init/systemd2init +++ b/systemd2init/systemd2init @@ -19,16 +19,14 @@ lsconf() { RET= - aug_path="/files/lib/systemd/system//${SYSTEMD_SERVICE}${1}" - [ -f "$SYSTEMD_SERVICE" ] && aug_path="/files$(pwd)//${SYSTEMD_SERVICE}${1}" - augtool -r "$WORKINGDIR" -t "Systemd incl $(pwd)/$SYSTEMD_SERVICE" ls "$aug_path" + aug_path="/files/${SYSTEMD_SERVICE}${1}" + augtool -r "$WORKINGDIR" -t "Systemd incl $SYSTEMD_SERVICE" ls "$aug_path" } getconf() { RET= - aug_path="/files/lib/systemd/system/${SYSTEMD_SERVICE}${1}" - [ -f "$SYSTEMD_SERVICE" ] && aug_path="/files$(pwd)/${SYSTEMD_SERVICE}${1}" - augtool -r "$WORKINGDIR" -t "Systemd incl $(pwd)/$SYSTEMD_SERVICE" get "$aug_path" | \ + aug_path="/files/${SYSTEMD_SERVICE}${1}" + augtool -r "$WORKINGDIR" -t "Systemd incl $SYSTEMD_SERVICE" get "$aug_path" | \ sed -e "s;^${aug_path}[[:space:]]*\((none)\|(o)\|= \)[[:space:]]*;;" }