编辑文件 cns.sh
This commit is contained in:
+7
-7
@@ -119,8 +119,8 @@ InstallInit() {
|
||||
|
||||
AddAutoStart() {
|
||||
if [ -n "$rcCommon" ]; then
|
||||
if /etc/init.d/cns enable; then
|
||||
echo '已添加开机自启, 如需关闭请执行: /etc/init.d/cns disable'
|
||||
if /etc/init.d/Acns enable; then
|
||||
echo '已添加开机自启, 如需关闭请执行: /etc/init.d/Acns disable'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@@ -136,19 +136,19 @@ AddAutoStart() {
|
||||
return
|
||||
fi
|
||||
fi
|
||||
if [ -d '/etc/rc.d/rc5.d' -a -f '/etc/init.d/cns' ]; then
|
||||
if ln -s '/etc/init.d/cns' '/etc/rc.d/rc5.d/S99cns'; then
|
||||
if [ -d '/etc/rc.d/rc5.d' -a -f '/etc/init.d/Acns' ]; then
|
||||
if ln -s '/etc/init.d/Acns' '/etc/rc.d/rc5.d/S99cns'; then
|
||||
echo '已添加开机自启, 如需关闭请执行: rm -f /etc/rc.d/rc5.d/S99cns'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
if [ -d '/etc/rc5.d' -a -f '/etc/init.d/cns' ]; then
|
||||
if ln -s '/etc/init.d/cns' '/etc/rc5.d/S99cns'; then
|
||||
if [ -d '/etc/rc5.d' -a -f '/etc/init.d/Acns' ]; then
|
||||
if ln -s '/etc/init.d/Acns' '/etc/rc5.d/S99cns'; then
|
||||
echo '已添加开机自启, 如需关闭请执行: rm -f /etc/rc5.d/S99cns'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
if [ -d '/etc/rc.d' -a -f '/etc/init.d/cns' ]; then
|
||||
if [ -d '/etc/rc.d' -a -f '/etc/init.d/Acns' ]; then
|
||||
if ln -s '/etc/init.d/Acns' '/etc/rc.d/S99cns'; then
|
||||
echo '已添加开机自启, 如需关闭请执行: rm -f /etc/rc.d/S99cns'
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user