-
Senior Member
registered user
New bash 3.1-1 from unstable causes remaster script to fail
Don't upgrade to bash version 3.1-1 because you can't use Fabian Franz's menu based scripts after that!
This is what you get:
Code:
root@Knoppix:~# knoppix-remaster /mnt/hda12/dvd-xorg-udev/
/usr/bin/knoppix-remaster: line 45: syntax error near unexpected token `('
/usr/bin/knoppix-remaster: line 45: ` let
REMASTER_PERC=($REMASTER_PROGRESS*100)/$REMASTER_NEEDED_SIZE'
root@Knoppix:~#
Stable and testing versions of bash works fine. If someone has this same problem, you can solve it by downgrading bash to stable or testing (no dependency problems).
-tapsa-
-
I haven't downloaded bash 3.1 but I always use "[]" brackets for my arithmetic.
Modify the line
Code:
REMASTER_PERC=($REMASTER_PROGRESS*100)/$REMASTER_NEEDED_SIZE
to read (functionally identical)
Code:
REMASTER_PERC=$[$REMASTER_PROGRESS*100/$REMASTER_NEEDED_SIZE]
and let me know if it helps.
-
Senior Member
registered user
Yes, it works! But then also line 66 must be changed similary to:
Code:
let REMASTER_NEEDED_SIZE=$[(df /cdrom /KNOPPIX | awk '{ N+=$3 } END { N+=(500000*0); print N }')*115)/100
REMASTER_HAVE_SIZE=$(df $REMASTER_CHOICE | awk '{ print $4 }' | tail -n1 ]
-tapsa-
-
Excellent ... I'm glad it worked.
-
Senior Member
registered user
Still problems. Now everything else works but not making a new remaster:
Code:
tapsa@linux:~$ sudo knoppix-remaster /mnt/hda16/remaster/
/usr/bin/knoppix-remaster: line 67: bad substitution: no closing `)' in REMASTER_NEEDED_SIZE=$[(df /cdrom /KNOPPIX | awk '{ N+=$3 } END { N+=(500000*0); print N }')*115)/100
REMASTER_HAVE_SIZE=$(df $REMASTER_CHOICE | awk '{ print $4 }' | tail -n1 ]
Sorry, but I'm not a developer myself and don't know how to fix this. This error message comes with new bash, so it need to be corrected. Perhaps it's time to ask Fabian Franz to do a new updated remaster script.
-tapsa-
-

Originally Posted by
tr
Still problems. Now everything else works but not making a new remaster:
Code:
tapsa@linux:~$ sudo knoppix-remaster /mnt/hda16/remaster/
/usr/bin/knoppix-remaster: line 67: bad substitution: no closing `)' in REMASTER_NEEDED_SIZE=$[(df /cdrom /KNOPPIX | awk '{ N+=$3 } END { N+=(500000*0); print N }')*115)/100
REMASTER_HAVE_SIZE=$(df $REMASTER_CHOICE | awk '{ print $4 }' | tail -n1 ]
Sorry, but I'm not a developer myself and don't know how to fix this. This error message comes with new bash, so it need to be corrected. Perhaps it's time to ask Fabian Franz to do a new updated remaster script.
-tapsa-
Believe it or not but from time to time returned error information is very accurate.
Since you haven't posted line numbers i'm guessin that this is line 67
REMASTER_HAVE_SIZE=$(df $REMASTER_CHOICE | awk '{ print $4 }' | tail -n1
]
The error "bad substitution: no closing `)'" refers to the square bracket on the end it should be a closing parenthesis as shown below.
REMASTER_HAVE_SIZE=$(df $REMASTER_CHOICE | awk '{ print $4 }' | tail -n1
)
-
Senior Member
registered user

Originally Posted by
firnsy
The error "bad substitution: no closing `)'" refers to the square bracket on the end it should be a closing parenthesis as shown below.
REMASTER_HAVE_SIZE=$(df $REMASTER_CHOICE | awk '{ print $4 }' | tail -n1
)
From the beginning there was problems with lines 45 and 66. Everything worked but making a new remaster. Now after changing line 67 as suggested I get error message of line 66.
Edited 3.1.2006
SOLVED 
The thing to do is use bash extension in line 45 and 66:
Code:
let "REMASTER_PERC=($REMASTER_PROGRESS*100)/$REMASTER_NEEDED_SIZE"
let "REMASTER_NEEDED_SIZE=($(df /cdrom /KNOPPIX | awk '{ N+=$3 } END { N+=(500000*0); print N }')*115)/100"
Brackets $[<SENTENCE>] are oudated and will be removed in the future versions of bash.
-tapsa-
-
Senior Member
registered user
I just removed the brackets in both lines and it worked fine.
Similar Threads
-
By JimmyJazz in forum Customising & Remastering
Replies: 2
Last Post: 07-04-2006, 05:40 PM
-
By dmizer in forum Customising & Remastering
Replies: 0
Last Post: 02-28-2006, 03:30 PM
-
By ska_p_te in forum Customising & Remastering
Replies: 3
Last Post: 10-29-2004, 09:03 PM
-
By lilsirecho in forum Knoppix DVD
Replies: 0
Last Post: 10-09-2004, 08:02 PM
-
By bizarro in forum General Support
Replies: 7
Last Post: 10-09-2004, 07:20 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

HP ProLiant MicroServer Gen8 G1610T @2.3 GHz, 16GB, 712317-001 NO HDD/OS
$199.00

Supermicro CSE-937 3U Storage Chassis No CPU No HDD No Ram Tested & Reset
$129.99

Supermicro 1U Network Server Appliance 16GB RAM 800GB SSD 6 LAN Ports Powers On
$450.00

Supermicro E300-12C Mini 1U Barebone X12SCV-LVDS LGA1200 SNK-P0073A4 w/ Adapter
$225.00

Supermicro E200-8D Mini Server Xeon D-1528 6-Core 64GB ECC 1TB SSD 2x10GbE IPMI
$525.00

HP PROLIANT MICROSERVER GEN8 E3-1220LV2 @ 2.30GHz, 8GB RAM, NO HDD/OS
$164.97

Supermicro 2U X10DRU-i 2x E5-2680 v3 2.5ghz 32gb Ram 240gb SSD 2x GPU *READ*
$369.99

New Barebones Supermicro 5019D Server, 4C/8T Xeon D-2123T, 1U Rackmountable, 10G
$449.99

Nasuni NF-50 Supermicro Server, Atom CPU C2558, @ 2.40GHz, 8GB RAM-No HDD/OS/AC
$250.00

Supermicro 505-2 Server
$280.00