HOME variable undefined

The 'fixmenus' script gets called in a place where it doesn't work properly. At bootup, /etc/rc.d/rc.update calls it at a version update of the 'pupsave' file, but at that time 'HOME' variable is not defined, which breaks some programs that fixmenus calls -- such as 'obmenu-refresh'.

I have put in a test in /usr/sbin/fixmenus to set HOME='/root' if not defined. This script is in 'xdg_puppy' PET package, now 'xdg_puppy-0.7.6-10-p4.pet'. Woof will now use that.

Posted on 28 Apr 2010, 15:43


Posted on 28 Apr 2010, 16:35 by zigbert
I have updated fixmenus in DuDE to meet this issue.

Added line:
[ ! "$HOME" ] && HOME='/root'

Did I get it right?


Posted on 28 Apr 2010, 19:29 by BarryK
Change it to:

[ ! "$HOME" ] && export HOME='/root'

Posted on 28 Apr 2010, 20:04 by zigbert
Thank you

Posted on 1 May 2010, 13:32 by BarryK
Re HOME again
No, I got it wrong. When rc.update is executing, HOME='/', so need this in fixmenus:

[ "$HOME" = "/" ] && HOME='/root'
export HOME