custombuild error - ./build: 10383: ./build: Syntax error: redirection unexpected

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
236
I updated custombuild today and build script stop working. Every build * command makes error:
Code:
 ./ build: 10383: ./build: Syntax error: redirection unexpected

Its my local problem or mayby global? How can i resolve this.

Regards
 
Last edited:

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
236
Code:
if ! /usr/local/mysql/bin/mysql --defaults-extra-file=--defaults-extra-file=${DA_MY_CNF}-e "select 1" 2>&1>/dev/null; then

Comment this IF and next (after commnet apperas errors in new lines) dosen't help.

Edit.
I commented all lines with this IF. I see so in build script are two IF with this condition but with diffrent code inside (other sleep value) and they come after each other.

Update download file from this address:
 
Last edited:

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
236
I think so here is error (probably double --defaults-extra-file= and no space after variable and before -e)
Code:
/usr/local/mysql/bin/mysql --defaults-extra-file=--defaults-extra-file=${DA_MY_CNF}-e "select 1"

This command in console gives error:
Code:
Fatal error in defaults handling. Program aborted

But this:
Code:
/usr/local/mysql/bin/mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e "select 1"
return
Code:
+---+
| 1 |
+---+
| 1 |
+---+

But script still dosen't work. The same error (./build: Syntax error: redirection unexpected)
 
Last edited:

tomputer

Verified User
Joined
Apr 5, 2016
Messages
33
Location
The Netherlands
We noticed that the build script fails on servers where /bin/sh symlinks to dash:
Code:
[email protected]:~# ls -ltr /bin/sh
lrwxrwxrwx 1 root root 4 Jan 24  2017 /bin/sh -> dash

It still works when running it with bash:
Code:
/bin/bash /usr/local/directadmin/custombuild/build update
 

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
236
It's work but at end of update error still appear:

Code:
 /bin/bash /usr/local/directadmin/custombuild/build update
--2020-06-19 16:12:53--  http://files24.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
Resolving files24.directadmin.com (files24.directadmin.com)... 194.59.159.74
Connecting to files24.directadmin.com (files24.directadmin.com)|194.59.159.74|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 252045 (246K) [application/octet-stream]
Saving to: './custombuild.tar.gz'

./custombuild.tar.gz                                        100%[========================================================================================================================================>] 246.14K  --.-KB/s    in 0.06s

2020-06-19 16:12:53 (4.29 MB/s) - './custombuild.tar.gz' saved [252045/252045]

Extracting custombuild.tar.gz...
./build: 10383: ./build: Syntax error: redirection unexpected

Anyway other build commands work's OK.
In previous version of custombuild problem dosen't exist. Maybe it should be fixed :>?

Thanks and regards
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
1,466
Location
Netherlands Germany
Look here same kind of problems with that 10383 line
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
10,296
Location
LT, EU
It's fixed already in latest release. I guess all of you had debian installed? :) (just wondering)
 

tomputer

Verified User
Joined
Apr 5, 2016
Messages
33
Location
The Netherlands
It's fixed already in latest release. I guess all of you had debian installed? :) (just wondering)

Yes, running Debian here. It is indeed fixed in build revision 2510.

However, the default system shell on Debian/Ubuntu is dash. Using /bin/bash is still required to update from revision 2508 to 2510:
Code:
/bin/bash /usr/local/directadmin/custombuild/build update
 

golfreeze

Verified User
Joined
Jun 21, 2011
Messages
6
./ build: 10383: ./build: Syntax error: redirection unexpected
found this error on FreeBsd12.0
Please kindly help
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
10,296
Location
LT, EU
./ build: 10383: ./build: Syntax error: redirection unexpected
found this error on FreeBsd12.0
Please kindly help
Try:
Code:
wget -O /usr/local/directadmin/custombuild/build http://files1.directadmin.com/services/custombuild/2.0/custombuild/build
 
Top