Commit 5bb4a226 by Michael H. Warfield Committed by Serge Hallyn

lxc-fedora template. Cleanup for rootfs.

This is just some minor changes in the way the Fedora template is synthesizing the target rootfs_path. Currently, the template uses a path with the container in it twice like this: /var/lib/lxc/rasputin/rasputin/rootfs This happens because the container name is already contained in the "path" and the template appends it a second time. This changes the logic to be congruent with other templates such as lxc-arch. The new behavior will be to create the rootfs like this: /var/lib/lxc/rasputin/rootfs Attached below the jump. Regards, Mike -- Michael H. Warfield (AI4NB) | (770) 985-6132 | mhw@WittsEnd.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it! -- Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 65be441e
...@@ -140,7 +140,7 @@ configure_fedora_systemd() ...@@ -140,7 +140,7 @@ configure_fedora_systemd()
{ {
unlink ${rootfs_path}/etc/systemd/system/default.target unlink ${rootfs_path}/etc/systemd/system/default.target
touch ${rootfs_path}/etc/fstab touch ${rootfs_path}/etc/fstab
chroot ${rootfs_path} ln -s /dev/null //etc/systemd/system/udev.service chroot ${rootfs_path} ln -s /dev/null /etc/systemd/system/udev.service
chroot ${rootfs_path} ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target chroot ${rootfs_path} ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
#dependency on a device unit fails it specially that we disabled udev #dependency on a device unit fails it specially that we disabled udev
# sed -i 's/After=dev-%i.device/After=/' ${rootfs_path}/lib/systemd/system/getty\@.service # sed -i 's/After=dev-%i.device/After=/' ${rootfs_path}/lib/systemd/system/getty\@.service
...@@ -412,7 +412,7 @@ if [ -n "$needed_pkgs" ]; then ...@@ -412,7 +412,7 @@ if [ -n "$needed_pkgs" ]; then
fi fi
if [ -z "$path" ]; then if [ -z "$path" ]; then
path=$default_path path=$default_path/$name
fi fi
if [ -z "$release" ]; then if [ -z "$release" ]; then
...@@ -438,7 +438,7 @@ if [ "$(id -u)" != "0" ]; then ...@@ -438,7 +438,7 @@ if [ "$(id -u)" != "0" ]; then
fi fi
rootfs_path=$path/$name/rootfs rootfs_path=$path/rootfs
# check for 'lxc.rootfs' passed in through default config by lxc-create # check for 'lxc.rootfs' passed in through default config by lxc-create
if grep -q '^lxc.rootfs' $path/config 2>/dev/null ; then if grep -q '^lxc.rootfs' $path/config 2>/dev/null ; then
rootfs_path=`grep 'lxc.rootfs =' $path/config | awk -F= '{ print $2 }'` rootfs_path=`grep 'lxc.rootfs =' $path/config | awk -F= '{ print $2 }'`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment