[1] I've taken Galen's suggestion and added support for multiple machine architectures. Ostensibly this is to support unixes and variants who do not use /usr/sbin to store userdel & groupdel commands.
[2] I've removed comments about the install logfile holding misleading information. I believe those comments were probably mistaken and am investigating the matter further. ** help wanted: I'd like suggestions of Perl Interpreter Machine Type Operating System Classifications for any machines which do not use the /usr/sbin directory for the commands userdel and groupdel with the exception of FreeBSD (or BSDs in general) if they do not have a groupdel command of some kind. (Not a procedure for editing the group file, and so forth. It must be one single command.) (**Please do not send instructions for procedures for editing users and groups.) A demonstration Koha uninstall script is here: http://www.help-desks.co.uk/downloads/uninstall_koha.pl.txt Patrick Mackeown ----- Original Message ----- From: "Galen Charlton" <[email protected]> To: "Patrick Mackeown" <[email protected]> Cc: <[email protected]> Sent: Wednesday, July 01, 2009 2:35 PM Subject: Re: [Koha-patches] No Koha Uninstall Script. > Hi, > > 2009/7/1 Patrick Mackeown <[email protected]>: >> I've been giving Bug 459 (No unistall script) some thought. And I've come >> up >> with what might well be a solution. I'd be interested to hear thoughts on >> the matter. > > Some initial thoughts, based on a cursory glance at the script. > First, thanks for taking this on. > > I see this in the comments: > > "PLEASE be aware that the install log's contents are *highly* suspect > the installation directories recorded in the installation log always > point to /usr/share/koha completely regardless of where the koha > installation actually took place! So, in truth, the significance is where > the install log is located (that's a likely location of the koha > installation > that you want to remove,) not what the install log says inside it." > > While in principle the install log is always going to be > untrustworthy, if it's in fact always plugging in "/usr/share/koha" > instead of the actual path, that's a bug. What version of Koha have > you tested this against - one of the 3.0.x distributions, or HEAD? > >> my $deluser= "/usr/sbin/userdel"; >> my $delgroup= "/usr/sbin/groupdel"; > > The script should should verify its assumptions about the platform. > > Later on: > >> # Env variables are present. >> $KOHAROOT=$ENV{PERL5LIB}; > > Since PERL5LIB is used by Perl, not Koha directly, the uninstall > script should keep in mind that it can be set to point to multiple > directories. If that condition applies, the script should either test > each one individually or terminate the uninstall script. > > Hopefully others will chime in with further comments and some testing. > I think the next version of this script can be accepted as a contrib, > but it will take a while before it's sufficiently idiot-resistant to > live in the main tree. > > Regards, > > Galen > -- > Galen Charlton > VP, Research & Development, LibLime > [email protected] > p: 1-888-564-2457 x709 > skype: gmcharlt _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
