Duplicated entry in /etc/hosts
This commit is contained in:
parent
4181356aa1
commit
cf0011c11c
|
@ -4396,8 +4396,11 @@ function set_your_domain_name {
|
|||
fi
|
||||
echo "$DEFAULT_DOMAIN_NAME" > /etc/hostname
|
||||
hostname $DEFAULT_DOMAIN_NAME
|
||||
sed -i "s/127.0.1.1.*/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts
|
||||
echo "127.0.1.1 $DEFAULT_DOMAIN_NAME" >> /etc/hosts
|
||||
if grep -q "127.0.1.1" /etc/hosts; then
|
||||
sed -i "s/127.0.1.1.*/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts
|
||||
else
|
||||
echo "127.0.1.1 $DEFAULT_DOMAIN_NAME" >> /etc/hosts
|
||||
fi
|
||||
echo 'set_your_domain_name' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
|
@ -8047,7 +8050,7 @@ function intrusion_detection {
|
|||
sed -i 's|/var/log.*||g' /etc/tripwire/twpol.txt
|
||||
# Ignore /etc/tripwire
|
||||
if ! grep -q "!/etc/tripwire" /etc/tripwire/twpol.txt; then
|
||||
sed -i '\|/etc\t\t->.*|a\ !/etc/tripwire;' /etc/tripwire/twpol.txt
|
||||
sed -i '\|/etc\t\t->.*|a\ !/etc/tripwire;' /etc/tripwire/twpol.txt
|
||||
fi
|
||||
# Avoid logging the changed database
|
||||
sed -i 's|$(TWETC)/tw.pol.*||g' /etc/tripwire/twpol.txt
|
||||
|
|
Loading…
Reference in New Issue