#!/bin/bash case "$script_type" in up) mv /etc/resolv.conf /etc/resolv.conf.bak echo "nameserver 10.31.33.8" > /etc/resolv.conf chattr +i /etc/resolv.conf 2>&1 > /dev/null ;; down) chattr -i /etc/resolv.conf 2>&1 > /dev/null cat /etc/resolv.conf.bak > /etc/resolv.conf rm -f /etc/resolv.conf.bak ;; esac