[Fai-commit] r6658 - in trunk: . debian lib
Michael Tautschnig
mt at alioth.debian.org
Sat Sep 10 21:37:19 UTC 2011
Author: mt
Date: 2011-09-10 21:37:19 +0000 (Sat, 10 Sep 2011)
New Revision: 6658
Removed:
trunk/debian/fai-client.lintian-overrides
Modified:
trunk/Makefile
trunk/lib/subroutines
Log:
Using shopt -s extglob won't work because bash fails with syntax error before
Use egrep instead of bash magic instead. As positive side effects avoids hacks
in syntax check during build and no need for lintian override.
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-09 11:36:18 UTC (rev 6657)
+++ trunk/Makefile 2011-09-10 21:37:19 UTC (rev 6658)
@@ -46,7 +46,7 @@
@echo -n "Checking for shell syntax errors"; \
for SCRIPT in $(BASH_SCRIPTS) $(SHELL_SCRIPTS); do \
test -r $${SCRIPT} || continue ; \
- bash -O extglob -n $${SCRIPT} || exit ; \
+ bash -n $${SCRIPT} || exit ; \
echo -n "."; \
done; \
echo " done."; \
Deleted: trunk/debian/fai-client.lintian-overrides
===================================================================
--- trunk/debian/fai-client.lintian-overrides 2011-09-09 11:36:18 UTC (rev 6657)
+++ trunk/debian/fai-client.lintian-overrides 2011-09-10 21:37:19 UTC (rev 6658)
@@ -1,2 +0,0 @@
-# subroutines uses shopt -s extglob and extended pattern matching
-fai-client binary: shell-script-fails-syntax-check ./usr/lib/fai/subroutines
Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines 2011-09-09 11:36:18 UTC (rev 6657)
+++ trunk/lib/subroutines 2011-09-10 21:37:19 UTC (rev 6658)
@@ -700,15 +700,11 @@
echo -n "Kernel currently running: "
uname -rsmo
echo -n "Kernel parameters: "; cat /proc/cmdline
- shopt -s extglob
for word in $(cat /proc/cmdline) ; do
- case $word in
- *([a-zA-Z0-9_])=*)
+ if echo "$word" | egrep -q '^[a-zA-Z0-9_]*=' ; then
eval "export $word"
- ;;
- esac
+ fi
done
- shopt -u extglob
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the Fai-commit
mailing list