Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: netnomad on June 14, 2011, 01:26:34 PM

Title: sakis3g on Tinycore
Post 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

Title: Re: sakis3g on Tinycore
Post by: gutmensch on June 14, 2011, 01:43:16 PM
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 :)

Title: Re: sakis3g on Tinycore
Post by: netnomad on June 14, 2011, 02:15:43 PM
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
Title: Re: sakis3g on Tinycore
Post by: gutmensch on June 14, 2011, 02:24:57 PM
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 ;-)
Title: Re: sakis3g on Tinycore
Post by: netnomad on June 14, 2011, 02:40:44 PM
i'm always in the bash... :)
Title: Re: sakis3g on Tinycore
Post by: gutmensch on June 14, 2011, 02:58:41 PM
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.
Title: Re: sakis3g on Tinycore
Post by: netnomad on June 14, 2011, 03:50:57 PM
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
Title: Re: sakis3g on Tinycore
Post by: curaga on June 15, 2011, 09:27:26 AM
Try tar.tcz for GNU tar.
Title: Re: sakis3g on Tinycore
Post by: netnomad on June 15, 2011, 05:51:32 PM
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!?
Title: Re: sakis3g on Tinycore
Post by: hiro on June 21, 2011, 11:57:43 AM
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?