SUSE Linux 10 rc.local tips

  

There is no rc.local in SUSE Linux 10, you want to use it you have to write an rc script file in the /etc/init.d/directory, then Use the chkconfig or inssev program to manage the configuration. The following small series will tell you about the specific steps.

Method a:

1. /etc/init.d/rc script editor, before the last exit 0, the following were added:

rc_local = /etc/rc.d/rc.local

current_runlevel=$(runlevel |  Awk '{ print $NF }')

if [ -x $rc_local ];then

((current_runlevel>1)) && ((current_runlevel<6)) & & {

echo -e "\ \ \ "

echo "-------------------- ---Startup $rc_local---------------------------"

$rc_local

}

fi

The above is the script content

2. Then create the /etc/rc.local file and give 755 permissions:

chmod 0755 /etc /rc.d/rc.local

Method 2:

1. Create the /etc/rc.d/rclocal file and add the following:

case "$1 " in

start)

if ! test -x /etc/init.d/rc.local ; then

echo '/etc/rc.local is not Exsit!'

exit 1

fi

/etc/init.d/rc.local &

;;

Stop)

;;

esac

The above is the content of the script

2.Create /etc/rc.d/rc.local and put you Boot scripts are executed Inside

3.chmod 0755 /etc/rc.d/rc.local /etc/rc.d/rclocal

4.chkconfig --add rclocal

The small series lists two methods for using rc.local. If you have other ways to use your friends, you can also interact with the Xiaobian message.

Copyright © Windows knowledge All Rights Reserved