DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-01-11 23:40:58

wdejong
New member
Registered: 2009-01-11
Posts: 2

How do I change $PATH? [-sh: funpkg: not found]

I'm able to use funpkg when logged in via telnet, but not SSH.

In a previous post, fonz asked another user to check his $PATH, saying he should see:

Code:

# whoami
root
# echo $PATH
/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin

But when I input those commands, I get:

Code:

~ # whoami
root
~ # echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/ffp/bin

How do I change $PATH

Will

Offline

 

#2 2009-01-12 18:32:08

kennedy101
Member
Registered: 2008-09-16
Posts: 48

Re: How do I change $PATH? [-sh: funpkg: not found]

Not sure if I can provide a good answer for you, mostly because ffp uses ash as the shell not bash. I ran into similar issues with optware running on top of ffp when I changed the root user default shell from ash to bash. I *think* the answer may be in the /ffp/etc/profile script.

I resorted to creating a file /root/.profile that echoed the new paths into my profile. The catch is that on EVERY login I needed to cd to my home folder and refresh the profile "user@nas323#. .profile" (note the TWO periods).

The /root/.profile file looked as follows

#!/bin/ash
PATH=/opt/bin:$PATH

In your case you'd replace /opt/bin with the missing paths.

Anyone know if there is a file we can create that is read before a user logs in? In bash it was .profile or .bashrc which would both reside in the users home directory.

-May be of some help as you add more paths, you may want to know what file is being executed if there are two on your system-

As a side note I found this VERY useful while using optware. Since ffp and optware both installed a set of core utilities (su, sudo, ash, etc...) you might sometimes wonder when you issue a command what file is being executed. I ened up installing the command "which" then issuing this command to find out what file was being executed.

ls -l `which su` (or whatever file you want to run, replace su). Note the backticks. It will tell you the exact location (and sym link) of the file you are executing.

I cant help you much more. I ended up doing a chroot debain install as I got the FULL core utilities I am used to having in ubuntu, and all dependencie and link issues were resolved.


DNS 323 (Hardware B1, Firmware 1.06). 2x 1.5TB Seagate HDs.
Chroot Debain (Lenny) on USB (not reloaded). Edna server. USB print server. USB drives added to samba share. All init.d scripts in place.
Future projects: FFP reloaded then chroot on B1 hardware.

Offline

 

#3 2009-01-13 01:40:14

wdejong
New member
Registered: 2009-01-11
Posts: 2

Re: How do I change $PATH? [-sh: funpkg: not found]

Thanks for your help.

I created /ffp/etc/profile, specifying my path and all is well.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB