1
0
mirror of synced 2026-01-19 17:18:39 +00:00
steve 31f9a9f0fd 2006-05-26 15:42:27 by steve
Revert the UDEV detection on the host.
2006-05-26 15:42:27 +00:00

54 lines
773 B
Bash
Executable File

#!/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