Current order of PACKAGESPLITFUNCS is: populate_packages_updatercd populate_packages_updatealternatives systemd_populate_packages package_do_split_locales populate_packages As You see populate_packages_updatercd is executed before populate_packages_updatealternatives. As a result we might have following content of DEB package postinst script: #!/bin/sh if type update-rc.d >/dev/null 2>/dev/null; then if [ -n "$D" ]; then OPT="-r $D" else OPT="-s" fi update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 . fi update-alternatives --install /etc/init.d/syslog syslog-init /etc/init.d/syslog.syslog-ng 200 update-rc.d will fail in case of absence of syslog target. But syslog target is created after update-rc.d execution. As You see, update-alternatives should be called BEFORE update-rc.d call. So at the end we should have this order of PACKAGESPLITFUNCS: populate_packages_updatealternatives populate_packages_updatercd systemd_populate_packages package_do_split_locales populate_packages
update-alternatives and update-rcd just don't play nicely together, luckily for this example there's an existing bug which has patches. *** This bug has been marked as a duplicate of bug 10944 ***