Lines Matching refs:rootfs_path
137 mkdir -p $rootfs_path/selinux
138 echo 0 > $rootfs_path/selinux/enforce
141 if [[ -f $rootfs_path/etc/selinux/config ]]
143 sed -i '/^SELINUX=/s/.*/SELINUX=disabled/' $rootfs_path/etc/selinux/config
148 if [ -f $rootfs_path/usr/sbin/selinuxenabled ]; then
149 mv $rootfs_path/usr/sbin/selinuxenabled $rootfs_path/usr/sbin/selinuxenabled.lxcorig
150 ln -s /bin/false $rootfs_path/usr/sbin/selinuxenabled
156 sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/login
157 sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/sshd
159 if [ -f ${rootfs_path}/etc/pam.d/crond ]
161 sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/crond
169 if [ -f ${rootfs_path}/lib/security/pam_loginuid.so ]
171 ( cd ${rootfs_path}/lib/security/
177 if [ -f ${rootfs_path}/lib64/security/pam_loginuid.so ]
179 ( cd ${rootfs_path}/lib64/security/
186 if [ -e /etc/localtime -a ! -e ${rootfs_path}/etc/localtime ]
189 cp -a /etc/localtime ${rootfs_path}/etc/localtime
205 if [ -f ${rootfs_path}/etc/init.d/halt ]
208 < ${rootfs_path}/etc/init.d/halt \
209 > ${rootfs_path}/etc/init.d/lxc-halt
211 echo '$command -f' >> ${rootfs_path}/etc/init.d/lxc-halt
212 chmod 755 ${rootfs_path}/etc/init.d/lxc-halt
216 cd ${rootfs_path}/etc/rc.d/rc0.d
218 cd ${rootfs_path}/etc/rc.d/rc6.d
224 cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0
236 cat <<EOF > ${rootfs_path}/etc/sysconfig/network
243 echo "${utsname}" > ${rootfs_path}/etc/hostname
247 cat <<EOF > $rootfs_path/etc/hosts
255 dev_path="${rootfs_path}/dev"
282 echo "# LXC (Linux Containers)" >>${rootfs_path}/etc/securetty
283 echo "lxc/console" >>${rootfs_path}/etc/securetty
284 echo "lxc/tty1" >>${rootfs_path}/etc/securetty
285 echo "lxc/tty2" >>${rootfs_path}/etc/securetty
286 echo "lxc/tty3" >>${rootfs_path}/etc/securetty
287 echo "lxc/tty4" >>${rootfs_path}/etc/securetty
288 echo "# For libvirt/Virtual Machine Monitor" >>${rootfs_path}/etc/securetty
289 echo "pts/0" >>${rootfs_path}/etc/securetty
303 echo "root:$root_password" | chroot $rootfs_path chpasswd
308 chroot $rootfs_path passwd -e root
314 mount -o bind /dev ${rootfs_path}/dev
315 mount -t proc proc ${rootfs_path}/proc
317 cp /etc/resolv.conf ${rootfs_path}/etc/
319 rm -f ${rootfs_path}/var/lib/rpm/__db*
320 chroot ${rootfs_path} rpm --rebuilddb
321 chroot ${rootfs_path} yum -y install fedora-release
323 if [[ ! -e ${rootfs_path}/sbin/NetworkManager ]]
328 chroot ${rootfs_path} chkconfig network on
331 umount ${rootfs_path}/proc
332 umount ${rootfs_path}/dev
335 touch ${rootfs_path}/etc/fstab
339 ${rootfs_path}/etc/sysconfig/init
346 sed -i 's|.sbin.start_udev||' ${rootfs_path}/etc/rc.sysinit
347 sed -i 's|.sbin.start_udev||' ${rootfs_path}/etc/rc.d/rc.sysinit
349 sed -i 's/^.*dev.pts.*$/#\0/' ${rootfs_path}/etc/rc.sysinit
350 sed -i 's/^.*dev.pts.*$/#\0/' ${rootfs_path}/etc/rc.d/rc.sysinit
351 chroot ${rootfs_path} chkconfig udev-post off
352 chroot ${rootfs_path} chkconfig network on
354 if [ -d ${rootfs_path}/etc/init ]
358 cat <<EOF >${rootfs_path}/etc/init/power-status-changed.conf
370 rm -f ${rootfs_path}/etc/systemd/system/default.target
371 touch ${rootfs_path}/etc/fstab
372 chroot ${rootfs_path} ln -s /dev/null /etc/systemd/system/udev.service
373 chroot ${rootfs_path} ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
375 chroot ${rootfs_path} ln -s /usr/lib/systemd/system/halt.target /etc/systemd/system/sigpwr.target
379 chroot ${rootfs_path} ln -s /dev/null /etc/systemd/system/tmp.mount
383 # sed -i 's/After=dev-%i.device/After=/' ${rootfs_path}/lib/systemd/system/getty\@.service
395 < ${rootfs_path}/lib/systemd/system/getty\@.service \
396 > ${rootfs_path}/etc/systemd/system/getty\@.service
399 ( cd ${rootfs_path}/etc/systemd/system/getty.target.wants
1014 echo -n "Copying rootfs to $rootfs_path ..."
1015 #cp -a $cache/rootfs-$basearch $rootfs_path || return 1
1017 mkdir -p $rootfs_path
1018 rsync -Ha $cache/rootfs/ $rootfs_path/
1061 echo "Copy $cache/rootfs to $rootfs_path ... "
1086 lxc.rootfs = $rootfs_path
1219 --rootfs) rootfs_path=$2; shift 2;;
1368 if [ -z "$rootfs_path" ]; then
1369 rootfs_path=$path/rootfs
1372 rootfs_path=$(sed -e '/^lxc.rootfs\s*=/!d' -e 's/\s*#.*//' \
1410 if [ -d ${rootfs_path}/etc/systemd/system ]
1418 if [ -f ${rootfs_path}/etc/rc.sysinit ]
1469 chroot ${rootfs_path} passwd
1471 chroot ${rootfs_path} passwd
1475 if ( mountpoint -q -- "${rootfs_path}" )
1491 chroot ${rootfs_path} passwd