autoinst

scripts to make automated installations of debian easy
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

config (1049B)


      1 # enable lo and load fr keyboard by /etc/runit/2
      2 sed -i /"$cp_target"/etc/runit/2 \
      3 	-e '/^exec env/ iip link set lo up\nloadkeys fr\n'
      4 
      5 FIRST_NIC="$(ip -brief link | awk '$1 !~ /^lo/{printf "%s\t%s\n", $1, $3; exit}')"
      6 
      7 # enable basic services: udev, dhcp on 1st nic, klogd, ssh and syslogd (which will probably be removed someday)
      8 ln -s /etc/sv/udev /"$cp_target"/etc/service/
      9 ln -s /etc/sv/klogd /"$cp_target"/etc/service/klogd
     10 ln -s /etc/sv/ssh /"$cp_target"/etc/service/ssh
     11 ln -s /etc/sv/bb-udhcpc /"$cp_target"/etc/service/$(echo "$FIRST_NIC" | cut -f1)
     12 ln -s /etc/sv/bb-syslogd /"$cp_target"/etc/service/syslogd
     13 
     14 # identify the machine's name by it's 1st MAC
     15 if test -f ./$SOURCE/machine_list
     16 then
     17 	HOSTNAME=$(grep ./$SOURCE/machine_list -e $(echo "$FIRST_NIC" | cut -f2) | cut -f2)
     18 	echo "$HOSTNAME" > /"$cp_target"/etc/hostname
     19 	if test -f /"$cp_target"/etc/hosts
     20 	then
     21 		sed -i /"$cp_target"/etc/hosts -e "s/localhost/& $HOSTNAME/"
     22 	else
     23 		printf "127.0.0.1 localhost $HOSTNAME\n::1 localhost $HOSTNAME\n" > /"$cp_target"/etc/hosts
     24 	fi
     25 fi