Tiny Core Base > TCB Bugs

useBusybox function causes syntax error in GUI terminal

(1/2) > >>

GNUser:
These commands cause no problems when run in a terminal in my router, which is CLI only (no X):

--- Code: ---$ . /etc/init.d/tc-functions
$ useBusybox
$
--- End code ---

Here are same commands on my laptop, in urxvt terminal emulator inside a GUI (Xorg) session:

--- Code: ---$ . /etc/init.d/tc-functions
$ useBusybox
sh: /etc/init.d/busybox-aliases: line 85: syntax error: unexpected "("

--- End code ---

Another oddity is that in the GUI session, "useBusybox" and all subsequent commands are in bold. It seems something in /etc/init.d/busybox-aliases is being interpreted as an escape sequence. Is this worth looking into and fixing?

P.S. Both machines are running TCL14-beta Pure x86_64

Rich:
Hi GNUser
I just tried it under  TCL14-alpha1 Pure x86_64  and got the same message
except it was  line 21. I used  aterm.tcz.

You don't need  . /etc/init.d/tc-functions.  It's already sourced in  ~/.ashrc.

GNUser:

--- Quote from: Rich on March 27, 2023, 02:15:08 PM ---Hi GNUser
I just tried it under  TCL14-alpha1 Pure x86_64  and got the same message
except it was  line 21. I used  aterm.tcz.

--- End quote ---
Hi Rich. It's unsightly, isn't it? I think it would be worth fixing.


--- Quote ---You don't need  . /etc/init.d/tc-functions.  It's already sourced in  ~/.ashrc.

--- End quote ---
Yep, I see it in there. Good to know. Thank you.

Rich:
Hi GNUser
I get the same results on  TCL14-alpha1 x86, TCL13 x86 and x86_64.

Rich:
Hi GNUser
Turns out this happens on TC9 x86 and TC10 x86 too:

--- Code: ---tc@E310:~$ . /etc/init.d/busybox-aliases
sh: /etc/init.d/busybox-aliases: line 21: syntax error: unexpected "("
tc@E310:~$ . /etc/init.d/tc-functions
tc@E310:~$
--- End code ---

I suspect what's happening is the contents of  busybox-aliases  is being interpreted as
a command because it doesn't use  alias  anymore. In TC4 useBusybox looked like this:

--- Code: ---useBusybox(){
alias ar="busybox ar"
alias awk="busybox awk"
alias cat="busybox cat"
alias clear="busybox clear"
alias cp="busybox cp"
alias cpio="busybox cpio"
alias dc="busybox dc"
alias df="busybox df"
alias du="busybox du"
alias depmod="busybox depmod"
alias expr="busybox expr"
alias fdisk="busybox fdisk"
alias fold="busybox fold"
alias grep="busybox grep"
alias gunzip="busybox gunzip"
alias hostname="busybox hostname"
alias kill="busybox kill"
alias killall="busybox killall"
alias ls="busybox ls"
alias md5sum="busybox md5sum"
alias mount="busybox mount"
alias sed="busybox sed"
alias sort="busybox sort"
alias swapoff="busybox swapoff"
alias sync="busybox sync"
alias tar="busybox tar"
alias umount="busybox umount"
alias wc="busybox wc"
alias wget="busybox wget"
alias sudo='sudo '
}
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version