[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: question on interaction between net-base and replacement dae


On 06-Jan-99 Shaleh wrote:
> will package nicely because it is well written.  My question is: how do I cope
> w/ the existing identd?  I expect that users installing this would prefer it
> over identd.  Is simply placing a call to update-inetd enough?  

I didn't investigate further, but here is the postinst of
wu-ftpd. It disables standard in.ftpd and adds his own
line to /etc/inetd.conf. Maybe you can take this example
as a start point and find some documentation about the
right and official way to do this.  ;)

-------------- begin: wu-ftpd.postinst --------------
# post install script for the Debian GNU/Linux wu-ftpd package

require DebianNet;      # from netbase package

open(INETD, "/etc/inetd.conf");

if (grep(/.*wu-ftpd.*/, @inetd)) {
    $DebianNet::sep = "## "; DebianNet::disable_service("ftp", "in.ftpd");
    $DebianNet::sep = "#<off># "; DebianNet::enable_service("ftp", "wu-ftpd");
} else {
    $DebianNet::sep = "## "; DebianNet::disable_service("ftp", "in.ftpd");
    $ftpentry = 'ftp            stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/wu-ftpd';
    $DebianNet::sep = "#<off># "; DebianNet::add_service($ftpentry, "STANDARD");


# check for old binaries in ~ftp/bin (are /bin/ls and ~ftp/bin/ls the same?)
$ret = system("/usr/sbin/addftpuser --check-binaries");
$ret /= 256;

if ($ret == 1) {
    print "\nDo you want to update them? [y] ";
    if (<STDIN> =~ /^n/i) {
        print "Okay...\n";
    print "\nUpdating binaries ...\n";
    system("/usr/sbin/addftpuser --update-binaries");

--------------- end: wu-ftpd.postinst ---------------

  Florian Hinzmann               f.hinzmann@public.uni-hamburg.de
                                 fh@dipa.de, fh@debian.org
NEW PGP-Key fingerprint: DD 61 74 34 04 FB 8A BD  43 54 83 38 0C 82 EF B1

Reply to: