Ubuntuには8つのランレベル(0-6とS)があります。ランレベル7を追加したいと思います。
私は次のことをしました:
1.-フォルダ/etc/rc7.d/を作成しました。このフォルダには、/ etc /init.d/へのシンボリックリンクがいくつか含まれています。
2.-ファイル/etc/event.d/rc7を作成しましたこれはその内容です:
# rc7 - runlevel 7 compatibility
#
# This task runs the old sysv-rc runlevel 7 ("multi-user") scripts. It
# is usually started by the telinit compatibility wrapper.
start on runlevel 7
stop on runlevel [!7]
console output
script
set $(runlevel --set 7 || true)
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 7
end script
それで十分だと思いましたが、telinit 7はまだこのエラーをスローします:telinit:不正なランレベル:7