BUILD_DIR=$(pwd)
# pkgs parsing utilities
-PATH=$(dirname $0):$PATH export PATH
-
-# old guests have e.g. mount in /bin but this is no longer part of
-# the standard PATH in recent hosts after usrmove, so let's keep it simple
-PATH=$PATH:/bin:/sbin export PATH
+export PATH=$(dirname $0):$PATH
. build.common
mknod -m 600 ${dev_path}/initctl p
mknod -m 666 ${dev_path}/ptmx c 5 2
- #echo "setting root passwd to $root_password"
- #echo "root:$root_password" | chroot $rootfs_path chpasswd
-
if [ "$(echo $fcdistro | cut -d"f" -f2)" -le "14" ]; then
fedora_configure_init
else
return 0
}
-# would be much simpler if enter-lxc-namespace was looking along a PATH...
-function bin_in_container () {
- binary=$1; shift
- lxc=$1; shift
-
- for path in /sbin /bin /usr/bin /usr/sbin; do
- [ -f $rootfs_path/$path/$binary ] && { echo $path/$binary; return; }
- done
- echo bin_in_container_cannot_find_$binary
-}
-
function post_install () {
lxc=$1; shift
personality=$1; shift
post_install_build $lxc $personality
lxc_start $lxc
# manually run dhclient in guest - somehow this network won't start on its own
- virsh -c lxc:/// lxc-enter-namespace $lxc $(bin_in_container dhclient $lxc) $VIF_GUEST
+ virsh -c lxc:/// lxc-enter-namespace $lxc $(bin_in_container $lxc dhclient) $VIF_GUEST
else
post_install_myplc $lxc $personality
lxc_start $lxc
config_path=$path/$lxc
cache_base=/var/cache/lxc/fedora/$arch
cache=$cache_base/$release
- root_password=root
# check whether the rootfs directory is created to know if the container exists
# bacause /var/lib/lxc/$lxc is already created while putting $lxc.timestamp