guardianproject / lildebi

UNMAINTAINED please adopt! we can no longer maintain this
https://guardianproject.info/code
GNU General Public License v3.0
229 stars 55 forks source link

apt-get problem and workaround #88

Closed Morosoph closed 10 years ago

Morosoph commented 10 years ago

apt-get cannot find ldconfig, so cannot install new packages from fresh install.

When Lil' Debi fires up a terminal, the PATH environment variable is set to /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games instead of /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin, yet whoami returns root.

In case this is specific to my system, uname -a returns: Linux localhost 3.4.0-cyanogenmod-g4ad0fd2 #1 SMP PREEMPT Sun Feb 9 18:54:07 PST 2014 armv7l GNU/Linux

The workaround is to enter 'source /etc/profile' on the command line before using apt-get.

eighthave commented 10 years ago

Hmm, that's a good idea. Can you send me a patch, or point more specifically where you inserted that line?

Morosoph commented 10 years ago

I'm afraid that this is a workaround; a kludge, rather than a fix, eighthave :(

You enter 'source /etc/profile' on the command line before you use apt-get, or anything else that makes use of */sbin. The root(!) of the problem is that /etc/profile is sourced before the user becomes root. A proper fix could be that the user is not made root by default, so that they have to become root (or use sudo), sourcing /etc/profile at that time.

dbrgn commented 10 years ago

This is a bit annoying. Would be great if a fix made it into the codebase.

Another possible workaround:

export PATH=$PATH:/sbin:/usr/sbin
eighthave commented 10 years ago

I fixed this, it was because Android's id does not respond to the -u flag.

eighthave commented 10 years ago

This is the same as #116