Skip to contentSkip to conversation

get_linux_config.sh: sets THIS_MINOR to 0 if not valid.

PATCH New julien.boibessot at free.fr 2 participants 2 messages Feb 9, 2010 – Feb 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_linux_config.sh: sets THIS_MINOR to 0 if not valid.

From: Julien Boibessot <[email protected]>

Sets THIS_MINOR to 0 if not valid, ie when processing a Linux config file who do not have a minor number extension; ex: "<name>-linux-2.6.<major>.config" Otherwise bash is raising an error/exception (line 59) and script can not complete.

---
 scripts/get_linux_config.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/get_linux_config.sh +1 -0
index 1950e9d..5cd0e37 100755
@@ -35,6 +35,7 @@ function linux_version()
 	KERNEL=`echo ${KCONFIG} | sed s/.*linux-2.6./linux-2.6./g -`
 	THIS_MAJOR=${KERNEL:10:2}
 	THIS_MINOR=${KERNEL:13}
+	THIS_MINOR=${THIS_MINOR:=0}
 }
 
 # Try to be careful...
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 get_linux_config.sh: sets THIS_MINOR to 0 if not valid.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"julien" == julien boibessot <[email protected]> writes:

julien> From: Julien Boibessot <[email protected]>
julien> Sets THIS_MINOR to 0 if not valid, ie when processing a Linux config file who do not julien> have a minor number extension; ex: "<name>-linux-2.6.<major>.config" julien> Otherwise bash is raising an error/exception (line 59) and script can not complete.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard