wok diff ppp/receipt @ rev 13207
Up collectd (5.1.0)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 06 15:08:32 2012 +0200 (2012-08-06) |
parents | 8c84f0c8afcb |
children | b768ede0c5cb |
line diff
1.1 --- a/ppp/receipt Sat Mar 24 09:29:55 2012 +0100 1.2 +++ b/ppp/receipt Mon Aug 06 15:08:32 2012 +0200 1.3 @@ -55,9 +55,33 @@ 1.4 cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts 1.5 cp -a $src/scripts/callback $fs/etc/ppp/scripts 1.6 cp -a $src/scripts/redialer $fs/etc/ppp/scripts 1.7 - 1.8 - cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up 1.9 - cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down 1.10 + cat >> $fs/etc/ppp/ip-up <<EOT 1.11 +if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then 1.12 + rm -f /etc/ppp/resolv.prev 1.13 + if [ -f /etc/resolv.conf ]; then 1.14 + cp /etc/resolv.conf /etc/ppp/resolv.prev 1.15 + grep domain /etc/ppp/resolv.prev > /etc/resolv.conf 1.16 + grep search /etc/ppp/resolv.prev >> /etc/resolv.conf 1.17 + cat /etc/ppp/resolv.conf >> /etc/resolv.conf 1.18 + chmod 644 /etc/resolv.conf 1.19 + else 1.20 + cp /etc/ppp/resolv.conf /etc 1.21 + chmod 644 /etc/resolv.conf 1.22 + fi 1.23 +fi 1.24 +EOT 1.25 + cat >> $fs/etc/ppp/ip-down <<EOT 1.26 +if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then 1.27 + if [ -f /etc/ppp/resolv.prev ]; then 1.28 + cp -f /etc/ppp/resolv.prev /etc/resolv.conf 1.29 + chmod 644 /etc/resolv.conf 1.30 + else 1.31 + rm -f /etc/resolv.conf 1.32 + fi 1.33 +fi 1.34 +EOT 1.35 + # cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up 1.36 + # cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down 1.37 chmod 711 $fs/etc/ppp/ip* 1.38 1.39 # insert #!/bin/sh on top line in ip* scripts 1.40 @@ -68,4 +92,4 @@ 1.41 chmod go-rwx $fs/etc/ppp/*secrets 1.42 chmod go-rwx $fs/etc/ppp/options 1.43 chmod 711 $fs/etc/ppp/scripts/* 1.44 -} 1.45 +} 1.46 \ No newline at end of file