Example config from 5.9
[fai-config.git] / hooks / repository.CENTOS
blobe78c0bbd47087012a3c06b5ad95cb2cf892e1693
1 #! /bin/bash
3 # (c) Michael Goetze, 2010-2011, mgoetze@mgoetze.net
5 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
7 if [ $FAI_ACTION = "install" ]; then
8 mount -t proc proc $target/proc
9 mount -t sysfs sysfs $target/sys
10 [ -L $target/etc/mtab ] || cp /etc/mtab $target/etc/mtab
12 cat > $target/etc/sysconfig/network <<-EOF
13 NETWORKING=yes
14 HOSTNAME=$HOSTNAME.$DOMAIN
15 EOF
16 echo "127.0.0.1 localhost" > $target/etc/hosts
17 ifclass DHCPC || ainsl -s /etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
18 cp /etc/resolv.conf $target/etc
21 mkdir $target/dev/pts
22 mknod -m 000 $target/dev/pts/ptmx c 5 2
24 fcopy -riv /etc/yum.repos.d/
26 # disable the fastestmirror plugin
27 #sed -i -e 's/enabled=1/enabled=0/' $target/etc/yum/pluginconf.d/fastestmirror.conf
29 skiptask repository
31 exit $error