Saya barusan mengotak - atik tapi tidak ada file /etc/inittab pada
RedHat 7.0
Dan ini saya sertakan isi file rc.single, saya bingung dimana
mengeditnya, tolong ya...... Thx :
============================================================
#!/bin/sh
. /etc/init.d/functions
# Set the path.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ "$1" != "start" ] ; then
exit 0
fi
# Kill all processes.
[ "${BASH+bash}" = bash ] && enable kill
echo "Sending all processes the TERM signal..."
kill -15 -1
sleep 5
echo "Sending all processes the KILL signal.."
kill -9 -1
rm -f /var/lock/subsys/*
# this looks nices
[ -x /usr/bin/clear ] && /usr/bin/clear
# make sure modprobe is working
if [ -f /proc/sys/kernel/modprobe ]; then
sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
fi
# If they want to run something in single user mode, might as well run it...
for i in /etc/rc1.d/S[0-9][0-9]*; do
# Check if the script is there.
[ ! -f $i ] && continue
# Don't run [KS]??foo.{rpmsave,rpmorig} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue
[ "$i" = "/etc/rc1.d/S00single" ] && continue
$i start
done
# Now go to the single user level.
echo "Telling INIT to go to single user mode."
exec init -t1 S
. /etc/init.d/functions
# Set the path.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ "$1" != "start" ] ; then
exit 0
fi
# Kill all processes.
[ "${BASH+bash}" = bash ] && enable kill
echo "Sending all processes the TERM signal..."
kill -15 -1
sleep 5
echo "Sending all processes the KILL signal.."
kill -9 -1
rm -f /var/lock/subsys/*
# this looks nices
[ -x /usr/bin/clear ] && /usr/bin/clear
# make sure modprobe is working
if [ -f /proc/sys/kernel/modprobe ]; then
sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
fi
# If they want to run something in single user mode, might as well run it...
for i in /etc/rc1.d/S[0-9][0-9]*; do
# Check if the script is there.
[ ! -f $i ] && continue
# Don't run [KS]??foo.{rpmsave,rpmorig} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue
[ "$i" = "/etc/rc1.d/S00single" ] && continue
$i start
done
# Now go to the single user level.
echo "Telling INIT to go to single user mode."
exec init -t1 S
==========================================================================
SDH> ...
SDH> l1:1:wait:/etc/rc.d/rc.single
SDH> ...
SDH> Isi /etc/rc.d/rc.single :
SDH> #!/bin/sh
SDH> if [ -x /etc/rc.d/rc ]; then
SDH> /etc/rc.d/rc 1
SDH> fi
SDH> /bin/login
SDH> Tinggal diotak-atik lagi lebih lanjut.
SDH> /.detta
--
Best regards,
ZhiZhi mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------------
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Dapatkan FAQ milis dg mengirim email kosong ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3
Pengelola dapat dihubungi lewat [EMAIL PROTECTED]