#!/bin/sh
#
# Copyright 2007 SpinetiX S.A.
#
### BEGIN INIT INFO
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 0 6
# Default-Stop:
# Short-Description: avoid dhcpcd killing network on NFS-root systems
# Description: avoid dhcpcd killing network on NFS-root systems
### END INIT INFO
# chkconfig: 06 1 0

# dhcpcd always brings down the network on shutdown, which is
# incorrect on NFS-root systems, we workaround the problem by
# killing with the KILL signal the dhcpcd daemon before it is
# requested to exit, thus preventing it from ever bringing down
# the connection (and releasing the lease).

grep -q nfsroot= /proc/cmdline && killall -q -9 dhcpcd-bin
