From 4f6e778758a03ceec5a9b1caf09a4d1e7d171fb4 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 29 Jan 2008 15:41:10 +0000 Subject: Only allow .sh files to be used as net modules. --- sh/net.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sh/net.sh') diff --git a/sh/net.sh b/sh/net.sh index 58e9020d..7a304363 100755 --- a/sh/net.sh +++ b/sh/net.sh @@ -172,7 +172,7 @@ _gen_module_list() local x= f= force=$1 if ! ${force} && [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt "${MODULESDIR}" ]; then local update=false - for x in "${MODULESDIR}"/*; do + for x in "${MODULESDIR}"/*.sh; do [ -e "${x}" ] || continue if [ "${x}" -nt "${MODULESLIST}" ]; then update=true @@ -215,7 +215,7 @@ _gen_module_list() done } - for MODULE in "${MODULESDIR}"/*; do + for MODULE in "${MODULESDIR}"/*.sh; do sh -n "${MODULE}" || continue . "${MODULE}" || continue MODULE=${MODULE#${MODULESDIR}/} -- cgit v1.2.3