Linux

솔라리스 rc.local 등록

Naan 2017. 9. 6. 16:59
반응형

#vi mac

#!/bin/bash

# chkconfig: 2345 90 90  

# description: test service

case "$1" in

        start)

        /usr/local/bin/macchanger -m 00:00:00:00:00:00 eth0   --> mac 변경

        ;;

        stop)

        /usr/local/bin/macchanger --random eth0           --> mac random

        ;;

        *)

                echo "Usage {start|stop}"

        exit 1

        ;;

esac

exit 0


# chmod 0744 mac

# chown root:sys /etc/init.d/mac

# mv mac /etc/init.d/

# cd /etc/init.d

# ln mac /etc/rc2.d/S99mac

# ln mac /etc/rcn.d/K99mac




반응형