~ubuntu-branches/ubuntu/precise/resolvconf/precise-proposed

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Steve Langasek
  • Date: 2012-02-20 03:54:42 UTC
  • Revision ID: steve.langasek@canonical.com-20120220035442-jbaqndt0isrrkdnd
debian/config, debian/templates, debian/postinst: if we don't know that
/etc/resolv.conf was being dynamically managed before install (in at
least some cases), link the original contents of /etc/resolv.conf to
/etc/resolvconf/resolv.conf.d/tail so that any statically configured
nameservers aren't lost.  LP: #923685.    

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                                # Back up original file
48
48
                                if [ ! -e /etc/resolvconf/resolv.conf.d/original ] ; then
49
49
                                        cp -a /etc/resolv.conf /etc/resolvconf/resolv.conf.d/original
 
50
                                        db_get resolvconf/link-tail-to-original
 
51
                                        if [ "$RET" = "true" ]; then
 
52
                                                ln -s original /etc/resolvconf/resolv.conf.d/tail
 
53
                                        fi
50
54
                                else
51
55
                                        cp -a /etc/resolv.conf /etc/resolv.conf.dpkg-old
52
56
                                fi