Lines Matching refs:rootfs

109 # at the end, it will be   $cacheroot/rootfs-$arch-$variant
284 #Determine rootfs
285 #If backingstore was specified, lxc.rootfs should be present or --rootfs did the rootfs var creation
286 if [ -z "${rootfs}" ]; then
287 rootfs=`awk -F= '$1 ~ /^lxc.rootfs/ { print $2 }' "$path/config" 2>/dev/null`
288 if [ -z "${rootfs}" ]; then
290 rootfs="${path}/rootfs"
293 store_user_message "rootfs of container is : ${rootfs}"
325 [[ -n "${rootfs//\/}" ]] \
326 || die 8 "\$rootfs (%s) IS EMPTY OR MADE OF ONLY DIRECTORY SEPARATORS, THIS IS *VERY* BAD!\n" "${rootfs}"
331 # check if the rootfs already exists
332 [[ -d "${rootfs}/etc" ]] && die 18 "Error: \$rootfs (%s) already exists!" "${rootfs}"
342 printf "#### container_rootfs(): copying rootfs %s from cache %s ...\n" "${rootfs}" "${cachefs}"
344 | tar -x -p -f - --numeric-owner -C "${rootfs}" \
345 || die 1 "Error: cache copy to rootfs failed"
348 chroot "${rootfs}" /bin/true || die 1 "Error: 'chroot %s /bin/true' failed"
361 sed -i "s/^c[${mindis}-6]/#&/" "${rootfs}/etc/inittab"
366 sed 's/agetty -a root/agetty/' -i "${rootfs}/etc/inittab"
368 sed "s/agetty -a root/agetty -a ${user}/" -i "${rootfs}/etc/inittab"
390 if [ -f "${rootfs}/${target}" ]; then
392 chroot "${rootfs}" ln -sf "${target}" "/etc/localtime"
402 cat /etc/localtime > "${rootfs}/etc/localtime"
407 chroot "${rootfs}" ln -sf /usr/share/zoneinfo/UTC /etc/localtime
423 if chroot ${rootfs} portageq get_repo_path / gentoo > /dev/null ; then
424 portage_container="$(chroot ${rootfs} portageq get_repo_path / gentoo)"
457 chroot "${rootfs}" mkdir ${portage_container}
465 cat <<- EOF >> "${rootfs}/etc/portage/make.conf"
483 printf "# untaring private portage to %s from %s ... \n" "${rootfs}/${portage_container}" "${portage_cache}"
484 mkdir -p "${rootfs}/${portage_container}"
486 tar -xp --strip-components 1 -C "${rootfs}/${portage_container}" \
565 container_conf_net "$path/config" >> "${rootfs}/etc/conf.d/net"
575 echo 'rc_provide="net"' >> "${rootfs}/etc/rc.conf"
601 chroot "${rootfs}" ln -s net.lo "/etc/init.d/net.${nic}"
602 chroot "${rootfs}" rc-update add net.${nic} default
604 mkdir -p "${rootfs}/sys/class/net/${nic}"
605 echo ${sys_nic_index} > "${rootfs}/sys/class/net/${nic}/ifindex"
606 echo up > "${rootfs}/sys/class/net/${nic}/operstate"
626 printf "hostname=\"%s\"\n" "${name}" > "${rootfs}/etc/conf.d/hostname"
635 chroot "${rootfs}" useradd --create-home -s /bin/bash "${user}" || die 1 "failed to create user ${user}"
640 auth_home=$(chroot "${rootfs}" getent passwd "${user}" | cut -d : -f 6)
643 mkdir -p "${rootfs}/${auth_home}/.ssh"
644 cat "${auth_key}" >> "${rootfs}/${auth_home}/.ssh/authorized_keys"
645 chroot "${rootfs}" chown "${user}:" "${auth_home}/.ssh/authorized_keys"
653 echo "${user}:${password}" | chroot "${rootfs}" chpasswd || die 1 "failed to change password"
666 chroot "${rootfs}" rc-update add sshd || die 1 "failed to enable sshd\n"
689 if grep -q "^lxc.rootfs" "${conf_file}" ; then
693 conf_rootfs_line="lxc.rootfs = $(readlink -f "${rootfs}")"
782 options=$(getopt -o hp:n:a:FcPv:t:S:u:w:s:m: -l help,rootfs:,path:,name:,arch:,flush-cache,cache-only,private-portage,variant:,portage-dir:,tarball:,auth-key:,user:,autologin,password:,settings:,mirror:,tty: -- "$@")
790 --rootfs) rootfs=$2; shift 2;;
816 cachefs="${cacheroot}/rootfs-${arch}-${variant}"