autoinst

scripts to make installation of custom debian easier and more automated
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

commit e36cb5fc14660f50185cd87bac970b7ae2841358
parent 8466097eb918f7951466168568ec887b3d3b4795
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Sun, 13 Dec 2020 02:34:42 +0100

use correct paths for machine_list and /etc/hosts

Diffstat:
Mtemplates/generic/config | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/templates/generic/config b/templates/generic/config @@ -12,14 +12,14 @@ ln -s /etc/sv/bb-udhcpc /"$cp_target"/etc/service/$(echo "$FIRST_NIC" | cut -f1) ln -s /etc/sv/bb-syslogd /"$cp_target"/etc/service/syslogd # identify the machine's name by it's 1st MAC -if test -f machine_list +if test -f ./$SOURCE/machine_list then - HOSTNAME=$(grep machine_list -e $(echo "$FIRST_NIC" | cut -f2)) + HOSTNAME=$(grep ./$SOURCE/machine_list -e $(echo "$FIRST_NIC" | cut -f2)) echo "$HOSTNAME" > /"$cp_target"/etc/hostname if test -f /"$cp_target"/etc/hosts then sed -i /"$cp_target"/etc/hosts -e "s/localhost/& $HOSTNAME/" else - printf "127.0.0.1 localhost $HOSTNAME\n::1 localhost $HOSTNAME\n" > /etc/hosts + printf "127.0.0.1 localhost $HOSTNAME\n::1 localhost $HOSTNAME\n" > /"$cp_target"/etc/hosts fi fi