Skip to content
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

Improve check for systemd in a template for Fedora #29

Closed
wants to merge 1 commit into from
Closed

Improve check for systemd in a template for Fedora #29

wants to merge 1 commit into from

Conversation

kaorimatz
Copy link

The /usr/bin/systemd symlink has been removed from the systemd package in Fedora Rawhide.

Therefore, the current template script fails to find systemd on such a host.

# lxc-create -n test -t fedora -- --release=19
Host CPE ID from /etc/os-release: cpe:/o:fedoraproject:fedora:20
Checking cache download in /usr/local/var/cache/lxc/fedora/x86_64/19/rootfs ...
...
sed: can't read /usr/local/var/lib/lxc/test/rootfs/etc/rc.sysinit: No such file or directory
sed: can't read /usr/local/var/lib/lxc/test/rootfs/etc/rc.d/rc.sysinit: No such file or directory
sed: can't read /usr/local/var/lib/lxc/test/rootfs/etc/rc.sysinit: No such file or directory
sed: can't read /usr/local/var/lib/lxc/test/rootfs/etc/rc.d/rc.sysinit: No such file or directory
error reading information on service udev-post: No such file or directory
container rootfs and config created

I've created a patch to fix this problem.

@kaorimatz
Copy link
Author

I think I understand the problem.
Maybe the guest needs to be configured based on whether the guest system is based on sysvinit or systemd.
In that case, the code may look like this:

if [ $release -gt 14 ]; then
  configure_fedora_systemd
else
  configure_fedora_init
fi

I'll try to send this PR as a patch to the lxc-devel mailing list.

Thank you for your review.

@stgraber
Copy link
Member

The logic currently in the staging branch is to check for ${rootfs_path}/etc/systemd/system or ${rootfs_path}/etc/rc.sysinit which sounds sane to me assuming those do exist.

I see no reference to bin/systemd, so I'll consider this issue closed.

@stgraber stgraber closed this Aug 30, 2013
hallyn added a commit to hallyn/lxc that referenced this pull request Nov 12, 2014
Update wording of ssl spec based on review
stgraber pushed a commit to stgraber/lxc that referenced this pull request Feb 10, 2015
Expose StateMap to users of the binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants