を使用してUbuntu 14.04 LTS
入力しようとしましたが、sudo /etc.init.d/networking restart
出力は表示されず、何もしません。
ベストアンサー1
以下を見ること/etc/init.d/networking
ができます。
....
force-reload|restart)
if init_is_upstart; then
exit 1
fi
....
そして次から/lib/lsb/init-functions
:
# If the currently running init daemon is upstart, return zero; if the
# calling init script belongs to a package which also provides a native
# upstart job, it should generally exit non-zero in this case.
init_is_upstart()
{
if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | /bin/grep -q upstart; then
return 0
fi
return 1
}
Ubuntu 14.04
Distroは実行時にupstart
これを使用して、現在実行中であることを確認します。その場合はスクリプトを終了します。init daemon
/etc/init.d/networking restart
init daemon
upstart
upstart
ノート
私の中にはUbuntu 12.04
、いいえ。たぶん、最新バージョンに追加された可能性があります。init_is_upstart
/etc/lsb/init-functions
Ubuntu