50-host-classes
Marc Hoppins
marc.hoppins at eset.com
Wed Apr 27 08:03:42 CEST 2022
HI, Juri,
I don't see how that works, the hostname is going to end up being the hostname of the FAI server, isn't it?
-----Original Message-----
From: Juri Grabowski <fai-support at lihas.de>
Sent: Tuesday, April 26, 2022 5:08 PM
To: fully automatic installation for Linux <linux-fai at uni-koeln.de>
Cc: Marc Hoppins <marc.hoppins at eset.com>
Subject: Re: 50-host-classes
EXTERNAL
Hello,
Maybe you are looking for something like that:
#! /bin/bash
MYDOMAINNAME=$(hostname -d)
MYFQDN=$(hostname -f)
case $MYFQDN in
fqdnhost.example.com)
echo "EXAMPLECLASS1" ;;
*)
echo "FAIBASE DEBIAN DEMO" ;;
esac
case $MYDOMAINNAME in
mydemodomain2.example.com)
echo -en "DOMCLASS2 "
case $HOSTNAME in
demohost|client*)
echo "EXAMPLECLASS2" ;;
*)
echo "FAIBASE DEBIAN DEMO" ;;
esac ;;
mydemodomain3.example.com)
case $HOSTNAME in
demohost|client*)
echo "EXAMPLECLASS3" ;;
*)
echo "FAIBASE DEBIAN DEMO" ;;
esac ;;
esac
Best Regards,
gratuxri
More information about the linux-fai
mailing list