diff options
Diffstat (limited to 'init.d')
-rw-r--r-- | init.d/net.lo.in | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/init.d/net.lo.in b/init.d/net.lo.in index 5ea73c7..01c1b20 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -218,16 +218,20 @@ _show_address() _gen_module_list() { local x= f= force=$1 - if ! ${force} && [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt "${MODULESDIR}" ]; then - local update=false - for x in "${MODULESDIR}"/*.sh; do - [ -e "${x}" ] || continue - if [ "${x}" -nt "${MODULESLIST}" ]; then - update=true - break - fi - done - ${update} || return 0 + if ! ${force} ; then + if [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt /proc/$$/status ]; then + ewarn "Discarding cached module list ($MODULESLIST) as it's newer current time!" + elif [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt "${MODULESDIR}" ]; then + local update=false + for x in "${MODULESDIR}"/*.sh; do + [ -e "${x}" ] || continue + if [ "${x}" -nt "${MODULESLIST}" ]; then + update=true + break + fi + done + ${update} || return 0 + fi fi einfo "Caching network module dependencies" |