The Testing Area :: April extensions



You're right, using sudo from the menu is much cleaner.  And the exit script can check the first 4 lines of /etc/ld.so.conf just in case another extension does this kind of thing also and remove the right line.  Even though an extension that would have to do this would be something like gtk2 and therefore be mutually exclusive to this one.  I will look into using test, as well.  I think those would be good finishing touches.
Is there a reason for not looking through the whole file?  iirc it's not very big
If /opt/gtk+-2.12.9/lib is not before /usr/lib, then the freetype and glib2 in base will be the ones linked instead of the newer versions in /opt/gtk+-2.12.9.  The whole reason for having the entry on the first line.  Of course it could be on a later line as long as it is before /usr/lib.  Mounting the uci puts /opt/gtk+-2.12.9/lib at the end of the file.  Just not where it needs to be for the extension to function.  I have the unsetup script searching and removing the line from any of the first four lines of the file.  Now making the setup make sure that if the entry is in the first four lines that it is above /usr/lib.
It's not about that - it just seems like an artificial solution to me.  Even if it is there after that /usr/lib line, it doesn't affect it (if it's there anyways shouldn't it be removed?) - but if that is of concern, maybe searching up until /usr/lib would be better imo.
At this point I say the best thing is to let the user edit the file.  The info file has the details.  User has complete control and knowledge that way, which is how I like it.

Thanks WDef for the script and Hats for the feedback and input, but now after 100 lines of code and 2 evenings of ignoring my wife and kids (I only see them 2 evenings a week) I reaffirm that simple is elegant.   If one wants to have a script to automate this extension, there is enough example here for him to do so.  The best script is one you make for you and your environment.

Next Page...
original here.