Lines Matching refs:path
51 # Check if given path is in a btrfs partition
57 # Check if given path is the root of a btrfs subvolume
65 path=$1
66 [ -d $path ] && return 0
67 mkdir -p $(dirname $path)
68 if which btrfs >/dev/null 2>&1 && is_btrfs $(dirname $path); then
69 btrfs subvolume create $path
71 mkdir -p $path
77 path=$1
78 [ -d $path ] || return 0
79 if which btrfs >/dev/null 2>&1 && is_btrfs_subvolume $path; then
80 btrfs subvolume delete $path
82 rm -rf $path
264 # $1 => path to the partial cache or the rootfs
494 path=$1
506 nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l`
508 grep -q "^lxc.network.hwaddr" $path/config || sed -i -e "/^lxc\.network\.type[ \t]*=[ \t]*veth/a lxc.network.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')" $path/config
513 sed -i -e "/lxc.network/{w ${path}/config-network" -e "d}" $path/config
516 sed -i -e "/lxc./{w ${path}/config-auto" -e "d}" $path/config
519 echo "" >> $path/config
520 echo "# Common configuration" >> $path/config
522 echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/ubuntu.common.conf" >> $path/config
525 echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/ubuntu.${release}.conf" >> $path/config
529 echo "" >> $path/config
530 echo "# Container specific configuration" >> $path/config
531 [ -e "$path/config-auto" ] && cat $path/config-auto >> $path/config && rm $path/config-auto
532 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config
533 cat <<EOF >> $path/config
539 echo "" >> $path/config
540 echo "# Network configuration" >> $path/config
541 cat $path/config-network >> $path/config
542 rm $path/config-network
653 # bind-mount the user's path into the container's /home
657 # use relative path in container
662 echo "lxc.mount.entry = $h $h2 none bind 0 0" >> $path/config
690 options=$(getopt -o a:b:hp:r:v:n:FS:du: -l arch:,bindhome:,help,path:,release:,variant:,name:,flush-cache,auth-key:,debug,rootfs:,packages:,user:,password:,mirror:,security-mirror: -- "$@")
739 -p|--path) path=$2; shift 2;;
798 if [ -z "$path" ]; then
799 echo "'path' parameter is required"
809 config="$path/config"
815 rootfs=$path/rootfs
831 copy_configuration $path $rootfs $name $arch $release