← Back to team overview

touch-packages team mailing list archive

[Bug 1479826] [NEW] 'systemctl enable apache2' wrongly reports a failure because of update-rc.d backwards compat actions

 

You have been subscribed to a public bug:

# lsb_release -rd
Description: Ubuntu 15.04
Release: 15.04

# apt-cache policy apache2
    Installed: 2.4.10-9ubuntu1
    Candidate: 2.4.10-9ubuntu1
    Version table:
  *** 2.4.10-9ubuntu1 0
             500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
             100 /var/lib/dpkg/status

# Problem description:
When using `systemctl enable apache2` to start apache2 by default on bootup, the command returns the returncode 1.
The systemd service for apache2 itself is generated by 'systemd-sysv-generator' based on /etc/init.d/apache2.

The output of `systemctl enable apache2` is:

```
Synchronizing state for apache2.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d apache2 defaults
Executing /usr/sbin/update-rc.d apache2 enable
Failed to execute operation: No such file or directory
```

The content of the generated transient service unit is:

```INI
# /run/systemd/generator.late/apache2.service
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/apache2
Description=LSB: Apache2 web server
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target
After=local-fs.target remote-fs.target network-online.target systemd-journald-dev-log.socket nss-lookup.target
Wants=network-online.target
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/apache2 start
ExecStop=/etc/init.d/apache2 stop
ExecReload=/etc/init.d/apache2 reload
```

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
'systemctl enable apache2' wrongly reports a failure because of update-rc.d backwards compat actions
https://bugs.launchpad.net/bugs/1479826
You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu.