Skip to content

Commit

Permalink
Merge pull request #833 from mar-kolya/fix-sshd-template-init-locatio…
Browse files Browse the repository at this point in the history
…n-for-systemd

Fix sshd template on systems with systemd
  • Loading branch information
stgraber committed Feb 21, 2016
2 parents 63f2635 + 7e8aa95 commit 0b09580
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/lxc-sshd.in
Expand Up @@ -125,6 +125,8 @@ copy_configuration()
rootfs=$2
name=$3

init_path=$(realpath --relative-to=/ $(readlink -f /sbin/init))

grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config
cat <<EOF >> $path/config
lxc.utsname = $name
Expand All @@ -140,7 +142,7 @@ lxc.mount.entry = /bin bin none ro,bind 0 0
lxc.mount.entry = /usr usr none ro,bind 0 0
lxc.mount.entry = /sbin sbin none ro,bind 0 0
lxc.mount.entry = tmpfs var/run/sshd tmpfs mode=0644 0 0
lxc.mount.entry = @LXCTEMPLATEDIR@/lxc-sshd sbin/init none ro,bind 0 0
lxc.mount.entry = @LXCTEMPLATEDIR@/lxc-sshd $init_path none ro,bind 0 0
lxc.mount.entry = /etc/init.d etc/init.d none ro,bind 0 0
lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
Expand Down

0 comments on commit 0b09580

Please sign in to comment.