Lines Matching refs:rootfs

57     cp $binary_path $rootfs/$binary_path
59 echo "Failed to copy $binary_path to rootfs"
68 rootfs=$1
72 $rootfs/selinux \
73 $rootfs/dev \
74 $rootfs/home \
75 $rootfs/root \
76 $rootfs/etc \
77 $rootfs/etc/init.d \
78 $rootfs/bin \
79 $rootfs/usr/bin \
80 $rootfs/sbin \
81 $rootfs/usr/sbin \
82 $rootfs/proc \
83 $rootfs/sys \
84 $rootfs/mnt \
85 $rootfs/tmp \
86 $rootfs/var/log \
87 $rootfs/usr/share/udhcpc \
88 $rootfs/dev/pts \
89 $rootfs/dev/shm \
90 $rootfs/lib \
91 $rootfs/usr/lib \
92 $rootfs/lib64 \
93 $rootfs/usr/lib64"
98 pushd $rootfs/dev > /dev/null || return 1
120 cat <<EOF >> $rootfs/etc/passwd
124 cat <<EOF >> $rootfs/etc/group
129 cat <<EOF >> $rootfs/etc/init.d/rcS
137 chmod 744 $rootfs/etc/init.d/rcS || return 1
142 cat <<EOF >> $rootfs/etc/inittab
148 chmod 644 $rootfs/etc/inittab || return 1
150 cat <<EOF >> $rootfs/usr/share/udhcpc/default.script
184 chmod 744 $rootfs/usr/share/udhcpc/default.script
196 $rootfs/usr/bin/dbclient \
197 $rootfs/usr/bin/scp \
198 $rootfs/usr/bin/ssh \
199 $rootfs/usr/sbin/dropbearkey \
200 $rootfs/usr/sbin/dropbearconvert \
205 mkdir $rootfs/etc/dropbear
206 dropbearkey -t rsa -f $rootfs/etc/dropbear/dropbear_rsa_host_key > /dev/null 2>&1
207 dropbearkey -t dss -f $rootfs/etc/dropbear/dropbear_dss_host_key > /dev/null 2>&1
234 $rootfs/etc/ssh \
235 $rootfs/var/empty/sshd \
236 $rootfs/var/lib/empty/sshd \
237 $rootfs/var/run/sshd \
256 cat <<EOF >> $rootfs/etc/passwd
260 cat <<EOF >> $rootfs/etc/group
265 ssh-keygen -t rsa -N "" -f $rootfs/etc/ssh/ssh_host_rsa_key >/dev/null 2>&1
266 ssh-keygen -t dsa -N "" -f $rootfs/etc/ssh/ssh_host_dsa_key >/dev/null 2>&1
269 cat <<EOF > $rootfs/etc/ssh/sshd_config
298 rootfs=$1
307 # copy busybox in the rootfs
308 cp $(which busybox) $rootfs/bin
310 echo "failed to copy busybox in the rootfs"
315 # it would be nice to just use "chroot $rootfs busybox --install -s /bin"
317 pushd $rootfs/bin > /dev/null || return 1
324 ln $rootfs/bin/busybox $rootfs/sbin/init
327 touch $rootfs/etc/fstab
330 chmod +s $rootfs/bin/passwd
331 touch $rootfs/etc/shadow
339 rootfs=$2
342 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config
365 if [ -d "/$dir" ] && [ -d "$rootfs/$dir" ]; then
378 chown -R root $path/rootfs >/dev/null 2>&1
383 chgrp -R root $path/rootfs >/dev/null 2>&1
395 options=$(getopt -o hp:n:s: -l help,rootfs:,path:,name:,mapped-uid:,mapped-gid:,ssh: -- "$@")
407 --rootfs) rootfs=$2; shift 2;;
427 # detect rootfs
429 if [ -z "$rootfs" ]; then
430 if grep -q '^lxc.rootfs' $config 2>/dev/null ; then
431 rootfs=$(awk -F= '/^lxc.rootfs =/{ print $2 }' $config)
433 rootfs=$path/rootfs
437 install_busybox $rootfs $name
439 echo "failed to install busybox's rootfs"
443 configure_busybox $rootfs
449 copy_configuration $path $rootfs $name