~pkern/netcfg/ubuntu

« back to all changes in this revision

Viewing changes to post-base-installer.d/40netcfg

  • Committer: Stéphane Graber
  • Date: 2012-02-07 14:15:09 UTC
  • Revision ID: stgraber@ubuntu.com-20120207141509-1zeykip18bpitfc8
Add a post-base-install hook to detect resolvconf and copy /run/resolvconf/resolv.conf outside the target so that when /run is bind-mounted DNS resolving continues to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
# Make sure resolvconf will still work with bind-mounted /run
 
3
 
 
4
if [ -L /target/etc/resolv.conf ] && [ -f /target/run/resolvconf/resolv.conf ]; then
 
5
        mkdir -p /run/resolvconf
 
6
        cp /target/run/resolvconf/resolv.conf /run/resolvconf/resolv.conf
 
7
fi