New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian Templates: Why change systemd default runlevel? #1111

Closed
adrelanos opened this Issue Aug 11, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@adrelanos
Member

adrelanos commented Aug 11, 2015

Could you please explain the rationale behind modifying the systemd default runlevel? What would happen if that would be left untouched?

https://github.com/marmarek/qubes-core-agent-linux/blob/c6fa6c9b19425770e093a085da697d3c28d974c2/debian/qubes-core-agent.postinst#L104-L106

# Set default "runlevel"
rm -f /etc/systemd/system/default.target
ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

https://github.com/marmarek/qubes-builder-debian/blob/56cd946068129185f69b703b9e5e450b8cfa698a/template_debian/02_install_groups_jessie.sh#L32-L36

#### '--------------------------------------------------------------------------
info ' Set multu-user.target as the default target (runlevel 3)'
#### '--------------------------------------------------------------------------
chroot rm -f /etc/systemd/system/default.target
chroot ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
@nrgaway

This comment has been minimized.

Show comment
Hide comment
@nrgaway

nrgaway Aug 11, 2015

I believe the purpose was to ensure a proper state upon installation. Many of these scripts were written before Debian included systemd as default and are also used for other distros.

Most likely the 02_install_groups_jessie.sh can be completely removed and those lines can be removed from 02_install_groups_wheezy.sh since they are now present in core-agent-linux.postinst. Note, that within core-agent-linux.postinst the target is only ever modified on the initial installation of the package, which happens during the template build process and not on further updates to the package.

nrgaway commented Aug 11, 2015

I believe the purpose was to ensure a proper state upon installation. Many of these scripts were written before Debian included systemd as default and are also used for other distros.

Most likely the 02_install_groups_jessie.sh can be completely removed and those lines can be removed from 02_install_groups_wheezy.sh since they are now present in core-agent-linux.postinst. Note, that within core-agent-linux.postinst the target is only ever modified on the initial installation of the package, which happens during the template build process and not on further updates to the package.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Aug 11, 2015

Member

Most likely the 02_install_groups_jessie.sh can be completely removed and those lines can be removed from 02_install_groups_wheezy.sh since they are now present in core-agent-linux.postinst.

Yes, exactly my thoughts. Created #1112 seconds before you wrote that. :)

Member

adrelanos commented Aug 11, 2015

Most likely the 02_install_groups_jessie.sh can be completely removed and those lines can be removed from 02_install_groups_wheezy.sh since they are now present in core-agent-linux.postinst.

Yes, exactly my thoughts. Created #1112 seconds before you wrote that. :)

adrelanos added a commit to adrelanos/qubes-builder-debian that referenced this issue Aug 11, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 26, 2015

Member

I think this code was Fedora-specific (copied from there). On Fedora
default systemd target was "graphical.target", which tries to start
kdm/gdm/lightdm, so X server without qubes gui agent.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Aug 26, 2015

I think this code was Fedora-specific (copied from there). On Fedora
default systemd target was "graphical.target", which tries to start
kdm/gdm/lightdm, so X server without qubes gui agent.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Sep 6, 2015

Member

The following pull request also solves this ticket:
marmarek/qubes-builder-debian#20

Member

adrelanos commented Sep 6, 2015

The following pull request also solves this ticket:
marmarek/qubes-builder-debian#20

marmarek added a commit to marmarek/qubes-builder-debian that referenced this issue Oct 7, 2015

@marmarek marmarek added this to the Release 3.1 milestone Oct 8, 2015

@marmarek marmarek closed this Oct 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment