aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-29 15:41:10 +0000
committerRoy Marples <roy@marples.name>2008-01-29 15:41:10 +0000
commit4f6e778758a03ceec5a9b1caf09a4d1e7d171fb4 (patch)
tree7cc26653b3d757711dced3742f3da460adcdf393 /sh
parent2bd31e8d033ec4488edb775cdac73d247207637a (diff)
Only allow .sh files to be used as net modules.
Diffstat (limited to 'sh')
-rwxr-xr-xsh/net.sh4
1 files changed, 2 insertions, 2 deletions
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}/}