diff options
author | Roy Marples <roy@marples.name> | 2008-01-29 15:41:10 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-29 15:41:10 +0000 |
commit | 4f6e778758a03ceec5a9b1caf09a4d1e7d171fb4 (patch) | |
tree | 7cc26653b3d757711dced3742f3da460adcdf393 | |
parent | 2bd31e8d033ec4488edb775cdac73d247207637a (diff) |
Only allow .sh files to be used as net modules.
-rwxr-xr-x | sh/net.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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}/} |