All pastes #219229 Raw Edit

7 moi

public text v1 · immutable
#219229 ·published 2006-10-24 15:49 UTC
rendered paste body
#!/bin/bash
echo 
echo        ---------- Configuration network  -----------
echo ---------- et ajout group user system et samba -----------
echo        ---------------------------------------------

#définir la variable $IP :
echo -n "IP à assigner à cette machine : " ; read IP ;
echo -n "Subnet Mask à assigner à cette machine : " ; read SUB ;
echo -n "Gateway à assigner à cette machine : " ; read GATE ;
echo "$(sed "s/IP/${IP}/g" /usr/local/sbin/newinterface.conf)" > ;
echo "$(sed "s/SUB/${SUB}/g" /usr/local/sbin/newinterface.conf)" ;
echo "$(sed "s/GATE/${GATE}/g" /usr/local/sbin/newinterface.conf)" > /etc/network/interfaces ;
echo "nameserver 151.99.125.2" > /etc/resolv.conf ;
echo "nameserver 151.99.125.3" >> /etc/resolv.conf ;
echo
echo        ---------- /etc/network/interfaces :   mis à jour  -----------
echo        ---------- /etc/resolv.conf :          mis à jour  -----------
echo        relance du service network...
/etc/init.d/networking restart