On 11/02/2009 01:22 PM, houghi wrote:
On Mon, Nov 02, 2009 at 08:42:09AM +0100, Adrian Schröter wrote:
Am Montag, 2. November 2009 08:27:09 schrieb Dave Plater:
Hi, I need to create a directory in the users homes on rpm installation, can anybody point me in the right direction?
This is horrible evil and can't work in all cases (for example if root has no write access to the home directory of the user, like with remote homes on NFS and friends).
Or if you add users after the installation
We have mechanisms to create directories on desktop start, but it is usually better when your application handles this itself.
That would be the best option. What you could do is also add the directory to /etc/skel. This might be gaining time if a lot needs to be placed the first time in that directory. If you do that a new user will have the required directory in his ~/.
However there must be a check in the program to see if the directory exists and if not, it must be made with the apropriate files. So the /etc/skel is additional to what you must do anyway and one can wonder if it is needed at all.
houghi
I used the script Marcus provided, as a wrapper and included the -p switch to mkdir. It works well and solves the problem. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org