upstream 5.1 sample config
[automated-distro-installer] / fai / config / hooks / repository.CENTOS
1 #! /bin/bash
2
3 # (c) Michael Goetze, 2010-2011, mgoetze@mgoetze.net
4
5 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
6
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
11
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
19 fi
20
21 mkdir $target/dev/pts
22 mknod -m 000 $target/dev/pts/ptmx c 5 2
23
24 fcopy -riv /etc/yum.repos.d/
25
26 # disable the fastestmirror plugin
27 #sed -i -e 's/enabled=1/enabled=0/' $target/etc/yum/pluginconf.d/fastestmirror.conf
28
29 skiptask repository
30
31 exit $error