X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=ce350b48b4dbb9d0c64059e52299bf10a2677df3;hb=3847b719dd4f7cd08676e1eadadc7c66d342077a;hp=179e9d918dafb182485010d17d237a6dae4f3d13;hpb=e4b8ca672ec6f70f7f89d6f6723d34cca0f7d3e2;p=vserver-reference.git diff --git a/build.sh b/build.sh index 179e9d9..ce350b4 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: build.sh,v 1.6 2006/03/29 19:19:55 mlhuang Exp $ +# $Id$ # PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -17,7 +17,7 @@ if [ -d ../build ] ; then PATH=$PATH:../build srcdir=.. else - echo "Error: Could not find sources in either . or .." + echo "Error: Could not find $(cd .. && pwd -P)/build/" exit 1 fi @@ -93,6 +93,29 @@ for package in "${packagelist[@]}" ; do done mkfedora -v -r $releasever -a $basearch $packages $vroot +# Clean /dev +rm -rf $vroot/dev +mkdir -p $vroot/dev +mknod -m 666 $vroot/dev/null c 1 3 +mknod -m 666 $vroot/dev/zero c 1 5 +mknod -m 666 $vroot/dev/full c 1 7 +mknod -m 644 $vroot/dev/random c 1 8 +mknod -m 644 $vroot/dev/urandom c 1 9 +mknod -m 666 $vroot/dev/tty c 5 0 +mknod -m 666 $vroot/dev/ptmx c 5 2 +# For bash command substitution +ln -nsf ../proc/self/fd $vroot/dev/fd +# For df and linuxconf +touch $vroot/dev/hdv1 +# For TUN/TAP +mkdir -p $vroot/dev/net +mknod -m 600 $vroot/dev/net/tun c 10 200 +# For pseudo ttys +mkdir -p $vroot/dev/pts + +# Disable all services in reference image +chroot $vroot sh -c "/sbin/chkconfig --list | awk '{ print \$1 }' | xargs -i /sbin/chkconfig {} off" + # This tells the Boot Manager that it is okay to update # /etc/resolv.conf and /etc/hosts whenever the network configuration # changes. Users are free to delete this file.