| Server IP : 85.214.239.14 / Your IP : 216.73.216.108 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/task/3/cwd/proc/3/task/3/cwd/etc/wide-dhcpv6/ |
Upload File : |
#!/bin/sh
# dhcp6c-script for Debian/Ubuntu. Jérémie Corbier, April, 2006.
# resolvconf support by Mattias Guns, May 2006.
RESOLVCONF="/sbin/resolvconf"
[ -f /etc/default/wide-dhcpv6-client ] && . /etc/default/wide-dhcpv6-client
if [ -n "$new_domain_name" -o -n "$new_domain_name_servers" ]; then
old_resolv_conf=/etc/resolv.conf
new_resolv_conf=/etc/resolv.conf.dhcp6c-new
rm -f $new_resolv_conf
if [ -n "$new_domain_name" ]; then
echo search $new_domain_name >> $new_resolv_conf
fi
if [ -n "$new_domain_name_servers" ]; then
for nameserver in $new_domain_name_servers; do
# No need to add an already existing nameserver
res=$(grep "nameserver $nameserver" $old_resolv_conf)
if [ -z "$res" ]; then
echo nameserver $nameserver >> $new_resolv_conf
fi
done
fi
# Use resolvconf if available
if [ -h "$old_resolv_conf" -a -x "$RESOLVCONF" ]; then
for IFACE in $INTERFACES; do
cat $new_resolv_conf | $RESOLVCONF -a $IFACE
done
else
# To preserve IPv4 informations...
cat $old_resolv_conf >> $new_resolv_conf
chown --reference=$old_resolv_conf $new_resolv_conf
chmod --reference=$old_resolv_conf $new_resolv_conf
mv -f $new_resolv_conf $old_resolv_conf
fi
fi
exit 0