Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: netnomad on June 14, 2011, 01:26:34 PM
-
hi gutmensch,
thank you for your reply.
i get this result when i use the script:
tc@box:~$ sudo ./sakis3g --interactive --debug
/tmp/sakis3gz.10133.sakis3g: line 59: syntax error: bad substitution
-
Alright, I split off the topic because it is not directly related to the network starter packs, but maybe interesting to investigate, thanks for testing netnomad!
It seems you need at least coreutils.tcz extension, the error msg comes from printf (which is an applet of busybox in base). Please try again with coreutils.tcz loaded :)
-
it's a pitty, but it's the same result:
tc@box:~$ tce-load -i coreutils
libattr.tcz: OK
libcap.tcz: OK
gmp.tcz: OK
attr.tcz: OK
acl.tcz: OK
coreutils.tcz: OK
tc@box:~$ sudo ./sakis3g --interactive --debug
/tmp/sakis3gz.10155.sakis3g: line 59: syntax error: bad substitution
tc@box:~$ tce-load -i usb-modeswitch
libusb.tcz: OK
usb-utils.tcz: OK
usb-serial-2.6.33.3-tinycore.tcz: OK
tcl_tk.tcz: OK
usb-modeswitch.tcz: OK
tc@box:~$ sudo ./sakis3g --interactive --debug
/tmp/sakis3gz.11288.sakis3g: line 59: syntax error: bad substitution
-
ok, it must be the array substitution of the script in line 59, which is a bashism... forget about coreutils and usb-modeswitch first, try to load bash.tcz and run it with sudo /bin/bash sakis3g --debug ;-)
-
i'm always in the bash... :)
-
I guess you're not ;) the shebang in sakis3g script is just wrong... it is calling /bin/sh, and that only works if /usr/local/bin/bash from the extension is linked to /bin/sh (so you have to remove the link in the base to /bin/busybox and replace it with bash). Additionally you need glibc_apps.tcz for getent and at least coreutils.tcz for expr, and you have to replace /usr/bin/expr with the file from coreutils /usr/local/bin/expr, but that might only be a precedence problem on my side. Now I get at least the normal cli stuff :)
It would require to adapt all those changes to make an extension of it... btw. you can disassemble sakis3g and make the changes static - when you disassemble to /tmp, the "real" script is in /tmp/sakis3g-0.2.0e/src/sakis3g.
-
i tried your advices, changed the script-header to
#!/usr/local/bin/bash
loaded glibc_apps.tcz and coreutils.tcz
but nevertheless i get:
tc@box:~$ sudo ./sakis3g --interactive --debug
tar: no gzip/bzip2/xz magic
tc@box:~$ tce-load -i gzip bzip2
/mnt/sda2/tce/optional/gzip.tcz: OK
/mnt/sda2/tce/optional/bzip2.tcz: OK
tc@box:~$ tce-load -wi xz
xz is already installed!
tc@box:~$ sudo ./sakis3g --interactive --debug
tar: no gzip/bzip2/xz magic
-
Try tar.tcz for GNU tar.
-
no luck:
tc@box:~$ tce-load -i glibc_apps.tcz coreutils.tcz
/mnt/sda2/tce/optional/glibc_apps.tcz: OK
libattr.tcz: OK
libcap.tcz: OK
gmp.tcz: OK
attr.tcz: OK
acl.tcz: OK
coreutils.tcz: OK
tc@box:~$ tce-load -i tar
/mnt/sda2/tce/optional/tar.tcz: OK
tc@box:~$ tce-load -i bzip2
/mnt/sda2/tce/optional/bzip2.tcz: OK
tc@box:~$ tce-load -i gzip
/mnt/sda2/tce/optional/gzip.tcz: OK
tc@box:~$ sudo ./sakis3g --interactive --debugbzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
perhaps other ideas!?
-
What file is the script trying to extract? Run "file" on it perhaps?
I like the idea of integrating that international apn list.
Does anyone know an alternative to sakis3g without the gnu?