Bug 177197 - sys-apps/baselayout-2.0.0_alpha[1,2] init.sh bash syntax error
Bug#: 177197 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: avuton@gmail.com
Component: baselayout
URL: 
Summary: sys-apps/baselayout-2.0.0_alpha[1,2] init.sh bash syntax error
Keywords:  
Status Whiteboard: 
Opened: 2007-05-05 16:13 0000
Description:   Opened: 2007-05-05 16:13 0000
I get an error when init.sh starts, which pretty much makes everything bomb out
due to not loading the modules. I've needed this fix in alpha1, but never sent
it in due to thinking it was probably a known issue. To fix it I crowbar'd in
the following:

diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh
index fc19bdd..665dcd7 100755
--- a/sh.Linux/init.sh
+++ b/sh.Linux/init.sh
@@ -130,7 +130,7 @@ if [ -r /sbin/livecd-functions.sh ] ; then
        livecd_read_commandline
 fi

-[ "$(KV_to_int "$(uname -r)")" -ge "$(KV_to_int "2.6.0")" ]
+[[ "$(KV_to_int "$(uname -r)")" -ge "$(KV_to_int "2.6.0")" ]]
 K26=$?

 if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${RC_NAME}" != "VPS" -a "${K26}" =
"0" ] ; then

------- Comment #1 From Roy Marples (RETIRED) 2007-05-05 19:08:05 0000 -------
That looks like it does nothing.

What's the ouput of `uname -r`?

------- Comment #2 From Avuton Olrich 2007-05-05 19:14:34 0000 -------
2.6.20.11-sd48, believe the first time it happened it was actually 2.6.20.4-ck1

------- Comment #3 From Roy Marples (RETIRED) 2007-05-05 19:27:16 0000 -------
Created an attachment (id=118282) [details]
Work with funky kernel versions

Try this patch :)

------- Comment #4 From Avuton Olrich 2007-05-05 20:21:29 0000 -------
OK, that fixed this bug, and #177175, I believe. Way to hit two birds with one
stone. Thanks!

------- Comment #5 From Roy Marples (RETIRED) 2007-05-05 20:25:55 0000 -------
*** Bug 177175 has been marked as a duplicate of this bug. ***