Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proot error: 'SMP' not found(changing hostname) #240

Closed
dontknowhy opened this issue Aug 15, 2022 · 6 comments
Closed

proot error: 'SMP' not found(changing hostname) #240

dontknowhy opened this issue Aug 15, 2022 · 6 comments

Comments

@dontknowhy
Copy link

dontknowhy commented Aug 15, 2022

Problem description

umm.I saw #80 and i wanted to change my 'localhost' host name.
BUT i can't use the command to run my container.
aughhhhhh ( )
Steps to reproduce

Screenshot_20220815_222432.jpg
Expected behavior

neofetch(dontknowhy/neofetch):

         _,met$$$$$gg.          dontknowhy@dontknow-pad
    ,g$$$$$$$$$$$$$$$P.       -----------------------
  ,g$$P"        """Y$$.".     OS: Debian GNU/Linux bookworm/sid aarch64
 ,$$P'              `$$$.     Host: HONOR BRT-W09
',$$P       ,ggs.     `$$b:   Kernel: 5.18.15-release
`d$$'     ,$P"'   .    $$$    Uptime: 12 hours, 48 mins
 $$P      d$'     ,    $$P    Packages: 1746 (dpkg)
 $$:      $$.   -    ,d$$'    Shell: zsh 5.9
 $$;      Y$b._   _,d$P'      Terminal: Termux 0.118.0
 Y$$.    `.`"Y$$$$P"'         Terminal Font: Ubuntu Mono Nerd Font Complete Mono
 `$$b      "-.__              CPU: MT8797 (8) @ 2.000GHz
  `Y$$                        Memory: 4537MiB / 7838MiB
   `Y$$.
     `$$b.
       `Y$$b.
          `"Y$b._
              `"""

Additional information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=25084
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.ustc.edu.cn/termux/apt/termux-main stable main
# sources.list.d/pointless.list
deb https://mirrors.ustc.edu.cn/termux-its-pointless/24 termux extras
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.ustc.edu.cn/termux/apt/termux-x11/ x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.26.0
Android version:
12
Kernel build information:
Linux localhost 4.14.186+ #1 SMP PREEMPT Thu Aug 4 21:24:09 CST 2022 aarch64 Android
Device manufacturer:
HONOR
Device model:
BRT-W09

@michalbednarski
Copy link
Collaborator

That is due to shell scripting gotcha, see for example https://github.com/koalaman/shellcheck/wiki/SC2089

@dontknowhy
Copy link
Author

That is due to shell scripting gotcha, see for example https://github.com/koalaman/shellcheck/wiki/SC2089

The real problem is $(uname -v)
It will output:#1 SMP PREEMPT Thu Aug 4 21:24:09 CST 2022
And PRoot will think the SMP is a program and PREEEMPT… is the program's arg.
Now i replace $(uname -a) with WHAT:
Screenshot_20220816_132957.jpg

@dontknowhy
Copy link
Author

That is due to shell scripting gotcha, see for example https://github.com/koalaman/shellcheck/wiki/SC2089

The real problem is $(uname -v)
It will output:#1 SMP PREEMPT Thu Aug 4 21:24:09 CST 2022
And PRoot will think the SMP is a program and PREEEMPT… is the program's arg.
Now i replace $(uname -a) with WHAT:
Screenshot_20220816_132957.jpg

umm…
i think i resolve it…
Screenshot_20220816_134034.jpg

@dontknowhy
Copy link
Author

That is due to shell scripting gotcha, see for example https://github.com/koalaman/shellcheck/wiki/SC2089

The real problem is $(uname -v)
It will output:#1 SMP PREEMPT Thu Aug 4 21:24:09 CST 2022
And PRoot will think the SMP is a program and PREEEMPT… is the program's arg.
Now i replace $(uname -a) with WHAT:
Screenshot_20220816_132957.jpg

umm…
i think i resolve it…
Screenshot_20220816_134034.jpg

umm…
nope
Once i run mv debian-test debian-backup
And this line doesn't work anymore
Screenshot_20220816_140807.jpg
(you can see the hostname isn't your-hostname)

@michalbednarski
Copy link
Collaborator

This is because this parameter wasn't even passed to proot

Seems that passing multiple arguments where some contains spaces through variable is difficult in base, inline proot invocation and -k "..." argument away from variable into exec line

@dontknowhy
Copy link
Author

This is because this parameter wasn't even passed to proot

Seems that passing multiple arguments where some contains spaces through variable is difficult in base, inline proot invocation and -k "..." argument away from variable into exec line

So i changed the last line to:$proot -k\ "\Linux\dontknow-pad\5.19.2-aarch64\$(uname -v)\aarch64\localdomain\-1\" $command /usr/bin/login $@
PS:$proot=$PREFIX/bin/proot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants