Ubuntu 14.04でネットワークサービスを再起動できません。 [閉じる]

Ubuntu 14.04でネットワークサービスを再起動できません。 [閉じる]

を使用して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.04Distroは実行時にupstartこれを使用して、現在実行中であることを確認します。その場合はスクリプトを終了します。init daemon/etc/init.d/networking restartinit daemonupstartupstart

ノート

私の中にはUbuntu 12.04、いいえ。たぶん、最新バージョンに追加された可能性があります。init_is_upstart/etc/lsb/init-functionsUbuntu

おすすめ記事