#!/bin/sh # # This script ensures that the new guest images have a nicely # populated /dev directory. # # Steve # -- # http://www.steve.org.uk/ prefix=$1 dist=$2 # # This routine sets up /dev on a Debian GNU/Linux system. # function setupDebian { cd ${prefix}/dev ./MAKEDEV generic } # # This routine sets up /dev on a CentOS4 system. # function setupCentOS4 { chroot ${prefix} /bin/sh -c 'cd /dev && ./MAKEDEV console' chroot ${prefix} /bin/sh -c 'cd /dev && ./MAKEDEV null' chroot ${prefix} /bin/sh -c 'cd /dev && ./MAKEDEV zero' } # # Entry point to the script. # case "${dist}" in sarge|etch|sid) setupDebian ;; centos4) setupCentOS4 ;; *) echo "Unknown distribution '${dist}'. Fixme"; exit; ;; esac