Mailinglist Archive: opensuse-packaging (127 mails)

< Previous Next >
Re: [opensuse-packaging] How do I create a directory in $HOME on installation
  • From: Dave Plater <davejplater@xxxxxxxxx>
  • Date: Mon, 02 Nov 2009 10:08:04 +0200
  • Message-id: <4AEE9364.80702@xxxxxxxxx>
On 11/02/2009 10:03 AM, Marcus Meissner wrote:
On Mon, Nov 02, 2009 at 09:52:39AM +0200, Dave Plater wrote:
On 11/02/2009 09:35 AM, Marcus Meissner wrote:
On Mon, Nov 02, 2009 at 09:27:09AM +0200, Dave Plater wrote:

Hi, I need to create a directory in the users homes on rpm installation,
can anybody point me in the right direction?

You don't.

Create the directory on first program start if not present.

Ciao, Marcus

It's for a workaround while the Rosegarden developers decide how they're
going to approach the problem. I've tried this in %post :-
mkdir -p /home/$USER/rosegarden
chown $USER:users /home/$USER/rosegarden

Which seems to work but I'm not that familiar with environment variables
in linux.

The issue is, you do this for one user, in a totally unsafe way.

A workaround would be to have a wrapper script
/usr/bin/rosegarden (and move the old to rosegarden.bin)

something like:
#!/bin/sh
mkdir $HOME/rosegarden
exec /usr/bin/rosegarden.bin "$@"

Ciao, Marcus

Thanks I'll try that.
Regards
Dave P
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >