summarylogtreecommitdiffstats
path: root/dev-tld-resolver.install
blob: 5e1e77e66f3a50c7e4412d9ab2e7dee7d4718180 (plain)
1
2
3
4
5
6
7
8
9
10
## arg 1:  the new package version
post_install() {
    grep -q 'dev_tld' /etc/nsswitch.conf || sed -i '/^hosts/s/$/ dev_tld/' /etc/nsswitch.conf
}

## arg 1:  the old package version
post_remove() {
    grep -q 'dev_tld' /etc/nsswitch.conf && sed -i '/^hosts/s/ dev_tld//' /etc/nsswitch.conf
}