configuration du nom d'hote

This commit is contained in:
Jeremy MANSON 2017-10-31 22:52:07 +01:00
parent ecc4fa1200
commit ae1e7e624d

View File

@ -12,6 +12,10 @@ sed -i 's/keymap="us"/keymap="fr"/g' $CHROOT/etc/conf.d/keymaps
# Configuration réseau et activation de(s) interface(s) réseau au démarrage ainsi que le serveur SSH # Configuration réseau et activation de(s) interface(s) réseau au démarrage ainsi que le serveur SSH
cp /etc/resolv.conf $CHROOT/etc/resolv.conf cp /etc/resolv.conf $CHROOT/etc/resolv.conf
echo "127.0.0.1 localhost" > $CHROOT/etc/hosts
echo "::1 localhost" >> $CHROOT/etc/hosts
echo "127.0.1.1 $MYHOSTNAME.$MYDOMAIN $MYHOSTNAME" >> $CHROOT/etc/hosts
echo "hostname='"'$MYHOSTNAME'"'" > $CHROOT/etc/conf.d/hostname
for interfaces in `ls /sys/class/net | sed /lo/d` for interfaces in `ls /sys/class/net | sed /lo/d`
do do
chroot $CHROOT /bin/bash -c "ln -s /etc/init.d/net.lo /etc/init.d/net.$interfaces" chroot $CHROOT /bin/bash -c "ln -s /etc/init.d/net.lo /etc/init.d/net.$interfaces"