#!/bin/sh ############################################################################## # $Id: disable_service,v 1.1 2002/03/21 19:05:38 root Exp $ ############################################################################## # Disable the specified init script in all run levels ############################################################################## # $Log: disable_service,v $ # Revision 1.1 2002/03/21 19:05:38 root # Initial revision # ############################################################################## echo echo "Start of $0" echo ' $Id: disable_service,v 1.1 2002/03/21 19:05:38 root Exp $' BASE=/a if [ -z "$1" ] then echo " No init script specified" >&2 exit fi for i in $BASE/etc/rc?.d/S??$1 do echo " Disabling $i" new=`echo $i | sed 's,/S,/s,'` mv $i $new done for i in $BASE/etc/rc?.d/K??$1 do echo " Disabling $i" new=`echo $i | sed 's,/K,/k,'` mv $i $new done echo "End of $0"