Re: Netatalk2

From: Aaron Hall (lisps_at_vitaphone.net)
Date: 10/22/04

  • Next message: Ali Alphan Bayazit: "Re: no voice from some applications"
    Date: Fri, 22 Oct 2004 01:08:03 -0500 (CDT)
    To: debian-user <debian-user@lists.debian.org>
    
    

    On Thu, 21 Oct 2004, Joachim Smit wrote:

    > Now, I have the following problem.
    >
    > I can run './configure' with several options like:
    > --enable-redhat, --enable-suse etcetera to install the
    > start scripts. There isn't an option --enable-debian.

    You need an init script which will start up afpd, and whatever else in
    that package you use. (In particular, note that you need a cnid_xxx
    daemon; it does some housekeeping for the AppleShare catalog. I use
    cnid_metad, primarily because it's easy to deal with.)

    Essentially, all you need the script to do is this:

       /usr/local/sbin/afpd
       /usr/local/sbin/cnid_metad

    I did that manually, at the command line, while testing. Then I adapted
    a Debian's "skeleton" init script to the task, which I paste below. Then
    you need to make the appropriate symlinks in /etc/rcN.d, or use
    sysv-rc-conf to do that for you, or use file-rc. I use file-rc.

    (Warning, those familiar with Debian init scripts might find this ugly.
    Maybe this will shame me into cleaning it up and submitting it to
    upstream :)

    ----------

    #!/bin/sh
    #
    # skeleton Example initscript
    # This file should be used to construct scripts to be
    # placed in /etc/init.d.
    #
    # Author: Miquel van Smoorenburg <miquels@cistron.nl>.
    # Ian Murdock <imurdock@gnu.ai.mit.edu>.
    #
    # Please remove the "Author" lines above and replace them
    # with your own name if you copy and modify this script.
    #
    # Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl

    set -e

    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DESC="AppleShare server"
    NAME=afpd
    DAEMON=/usr/local/sbin/$NAME
    PIDFILE=/var/run/$NAME.pid
    SCRIPTNAME=/etc/init.d/local-netatalk

    # Gracefully exit if the package has been removed.
    test -x $DAEMON || exit 0

    # Read config file if it is present.
    #if [ -r /etc/default/$NAME ]
    #then
    # . /etc/default/$NAME
    #fi

    case "$1" in
       start)
             echo -n "Starting $DESC: $NAME"
             /usr/local/sbin/afpd -I -P $PIDFILE
             /usr/local/sbin/cnid_metad
             echo "."
             ;;
       stop)
             echo -n "Stopping $DESC: $NAME"
             kill `cat $PIDFILE`
             pkill cnid_metad
             echo "."
             ;;
       #reload)
             #
             # If the daemon can reload its configuration without
             # restarting (for example, when it is sent a SIGHUP),
             # then implement that here.
             #
             # If the daemon responds to changes in its config file
             # directly anyway, make this an "exit 0".
             #
             # echo -n "Reloading $DESC configuration..."
             # d_reload
             # echo "done."
       #;;
       restart|force-reload)
             #
             # If the "reload" option is implemented, move the "force-reload"
             # option to the "reload" entry above. If not, "force-reload" is
             # just the same as "restart".
             #
             echo -n "Restarting $DESC: $NAME"
             kill `cat $PIDFILE`
             pkill cnid_metad

             sleep 1

             /usr/local/sbin/afpd -I -P $PIDFILE
             /usr/local/sbin/cnid_metad
             echo "."
             ;;
       *)
             # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
             echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
             exit 1
             ;;
    esac

    exit 0

    -- 
    Aaron Hall           :    I do quarrel with logic that says, "Stupid people
    ahall@vitaphone.net  :    are associated with X, therefore X is stupid."
                          :    Stupid people are associated with everything.
                          :                                       -- Larry Wall
    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Ali Alphan Bayazit: "Re: no voice from some applications"

    Relevant Pages

    • Re: [SLE] Question about auto-startup/shutdown scripts
      ... be changing everytime a new package with a init script is installed ... Nisi defectum, haud refiecendum ...
      (SuSE)
    • pkgmk grabs wrong file
      ... I'm trying to create a package for the first time and I'm a bit confused ... f none /usr/local/sbin/nrpe 0755 root other ... When pkgmk runs it copies the init script file twice instead of copying each ...
      (comp.sys.sun.admin)
    • pkgmk grabs wrong file
      ... I'm trying to create a package for the first time and I'm a bit confused ... f none /usr/local/sbin/nrpe 0755 root other ... When pkgmk runs it copies the init script file instead of the program ...
      (comp.unix.solaris)