aboutsummarylogtreecommitdiffstats
path: root/libnss-resolver.install
diff options
context:
space:
mode:
Diffstat (limited to 'libnss-resolver.install')
-rw-r--r--libnss-resolver.install9
1 files changed, 9 insertions, 0 deletions
diff --git a/libnss-resolver.install b/libnss-resolver.install
new file mode 100644
index 000000000000..527ce85173c3
--- /dev/null
+++ b/libnss-resolver.install
@@ -0,0 +1,9 @@
+post_install() {
+ sed -i -re 's/^(hosts: .*files)(.*)$/\1 resolver\2/' /etc/nsswitch.conf
+ mkdir -p /etc/resolver
+}
+
+post_remove() {
+ rm -Rf /etc/resolver
+ sed -i -re 's/^(hosts: .*files)\ resolver(.*)$/\1\2/' /etc/nsswitch.conf
+}