static usb ethnet addresses
[automated-distro-installer] / fai / config / hooks / repository.ROCKY
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 ctam
9 [ -L $target/etc/mtab ] || cp /etc/mtab $target/etc/mtab
10
11 cat > $target/etc/sysconfig/network <<-EOF
12 NETWORKING=yes
13 HOSTNAME=$HOSTNAME.$DOMAIN
14 EOF
15 echo "127.0.0.1 localhost" > $target/etc/hosts
16 ifclass DHCPC || ainsl -s /etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
17 cp /etc/resolv.conf $target/etc
18 fi
19
20 fcopy -riv /etc/yum.repos.d/
21
22 # disable the fastestmirror plugin
23 #fai-sed 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
24
25 skiptask repository
26
27 exit $error