2012/6/7 rafael ff1 <rafael.f.f1@gmail.com>
I was debugging your PKGBUILD and how the behavior of LDM, and I was not able to find any problem related to user permissions. Maybe you can enlighten me.
Only problem I figure out is that when the ~/.LMD do not exists, running /usr/bin/lmd will report errors messages because it did not find ~/LMD/options... That is upstream's fault, as it should be able to figure out that ~/.LMD/options doesn't exist before trying to source it... Is this the problem you are having script related
Yes, that's the problem I have, the source is made by a student, so it's not complete, and I added a piece of source that checks if .LMD exists and if it doesn't exists it is created, without having to make anything (sed -s '325s#then#then\n\t[ ! -d ~/.LMD ] \&\& lmd -reconf#' -i "${pkgdir}"/usr/bin/lmd) But as the program owner after the installation is by default root, it doesn't works... moreover, the program can't be run as root, so I tried to change the user, with chown, and after that, as it doesn't worked, tried with another script on the post_install *if { [ ! -d /home/$USER /.LMD ] then lmd -reconf else echo "*\033[1;32m* .LMD already exists* \033[0m*"* The problem is that $USER is root, so it works, but only on the /root folder, and it should do that on the local user folder So, the problem is... $USER shouldn't be 'root', but the local user (in my case, for example, jorge). If I can do that I think the both two scripts will work... but I don't know how...