How to set path permanently?

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

How to set path permanently?

Postby rty » Sat Feb 16, 2013 1:24 pm

The path on my V2 only points to /usr/bin and /bin:/sbin. I have this problem only on my V2, not on Series 4.

$this->bbcode_second_pass_quote('', 'p')ogo2:~$ nginx -t
-bash: nginx: command not found
pogo2:~$ ntpd -s
-bash: ntpd: command not found
pogo2:~$ echo $PATH
/usr/bin:/bin:/sbin


I know I can fix it by running 'source /etc/profile' but the problem will reappear on subsequent reboots.

$this->bbcode_second_pass_quote('', 'p')ogo2:~$ source /etc/profile
[root@pogo2 ~]# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl
[root@pogo2 ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@pogo2 ~]# ntpd -s
[root@pogo2 ~]#


How to set the path permanently to the defined path in /etc/profile? Anyone?
Alarm + Samba + NginX + Php+ MySQL + phpMyAdmin on Raspberry Pi 3, Pogoplug 4, Pogoplug E02, Seagate Goflex Home
rty
 
Posts: 75
Joined: Sun Jun 03, 2012 8:57 am
Location: Singapore

Re: How to set path permanently?

Postby winestock » Sat Feb 16, 2013 10:45 pm

Not sure what version of Arm Linux you are using on your PPv2 but maybe /etc/bash.bashrc is where you want to put the path modification.
Pogoplug Series 4 / Linux-Kirkwood 3.10.10-2
winestock
 
Posts: 134
Joined: Mon Nov 05, 2012 12:03 am

Re: How to set path permanently?

Postby rty » Sun Feb 17, 2013 2:11 pm

I have found the answer here: http://www.troubleshooters.com/linux/prepostpath.htm

In my V2, I have found /root/.bash_profile contained these two lines:

$this->bbcode_second_pass_quote('', 'e')xport PS1='\h:\w$ '
export PATH='/usr/bin:/bin:/sbin'


whereas /root/.bash_profile/ in my Series 4 is blank. After removing those two lines, the problem is fixed.

Note: Both V2 and Series 4 are running 3.7.7-0-ARCH
Alarm + Samba + NginX + Php+ MySQL + phpMyAdmin on Raspberry Pi 3, Pogoplug 4, Pogoplug E02, Seagate Goflex Home
rty
 
Posts: 75
Joined: Sun Jun 03, 2012 8:57 am
Location: Singapore
Top


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 134 guests