1d31695dce
add basic disable-script (still not reinstall old binaries)
45 lines
871 B
Bash
45 lines
871 B
Bash
#!/bin/sh
|
|
#
|
|
# $OpenBSD: bind9-disable,v 1.1 2001/08/21 18:00:25 jakob Exp $
|
|
#
|
|
# this script disables BIND v9 by removing links created by
|
|
# bind9-enable.
|
|
|
|
PREFIX=y0y0y0
|
|
BINDIR=/usr/sbin
|
|
|
|
if [ `id -u` -ne 0 ]; then
|
|
echo "You must be root to run this script."
|
|
exit
|
|
fi
|
|
|
|
echo "This script will remove BIND v9 links from $BINDIR"
|
|
echo ""
|
|
echo -n "Are you sure you want to to this (y/[n])? "
|
|
|
|
read answer
|
|
echo ""
|
|
|
|
if [ X$answer != Xy ]; then
|
|
echo "exit"
|
|
exit
|
|
fi
|
|
|
|
######################################################################
|
|
echo "Removing BIND v9 links:"
|
|
|
|
for link in \
|
|
dig host nslookup nsupdate \
|
|
named rndc lwresd \
|
|
dnssec-keygen dnssec-makekeyset dnssec-signkey dnssec-signzone \
|
|
named-checkconf named-checkzone
|
|
do
|
|
if [ -L $BINDIR/$link ]; then
|
|
echo " $link"
|
|
rm -f $BINDIR/$link
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo done.
|