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 8a0e22d5f5860f8fdfe4b439cef78c1a88a63c76
parent 5326df3acb03296d3e8e3b6d6e589c4a83bc5821
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Sun, 13 Dec 2020 02:15:31 +0100

removeme: adds generic/machine_list to ease my life

Diffstat:
Mtemplates/generic/config | 6+++---
Atemplates/generic/machine_list | 7+++++++
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/templates/generic/config b/templates/generic/config @@ -8,14 +8,14 @@ FIRST_NIC="$(ip -brief link | awk '$1 !~ /^lo/{printf "%s\t%s\n", $1, $3; exit}' ln -s /etc/sv/udev /"$cp_target"/etc/service/ ln -s /etc/sv/klogd /"$cp_target"/etc/service/klogd ln -s /etc/sv/ssh /"$cp_target"/etc/service/ssh -ln -s /etc/sv/bb-udhcpc /"$cp_target"/etc/service/$(echo $FIRST_NIC | cut -f1) +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 then - HOSTNAME=$(grep machine_list -e $(echo $FIRST_NIC | cut -f2)) - echo $HOSTNAME > /"$cp_target"/etc/hostname + HOSTNAME=$(grep 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/" diff --git a/templates/generic/machine_list b/templates/generic/machine_list @@ -0,0 +1,7 @@ +08:01:00:01:00:01 srv_router +08:01:00:01:00:02 srv_files +08:01:00:01:00:03 srv_krb +08:01:00:01:00:04 srv_ldap +08:01:00:01:00:05 srv_mon +08:01:00:02:00:01 cli_krb +08:01:00:02:00:02 cli_ldap