Ticket #1992: avahi-0.6.25-lfs_initscript_fixes-1.patch

File avahi-0.6.25-lfs_initscript_fixes-1.patch, 3.9 KB (added by willimm, 14 years ago)

New version of the Avahi LFS Initscripts patch. Please use, it also includes part of Ringlis' fixes. Run autoreconf -i -v right after applying this patch.

  • initscript/lfs/avahi

    Submitted By: William Immendorf <will.immendorf@gmail.com>
    Date: 2010-04-03
    Initial Package Version: 0.6.25
    Upstream Status: Have yet to submit it.
    Origin: Self, with some fixes by BLFS Trac user Ringis.
    Description: Various fixes for the Avahi initscripts. Run autoreconf -i -v after applying this patch.
    
    diff -Naur avahi-0.6.25.orig/initscript/lfs/avahi avahi-0.6.25/initscript/lfs/avahi
    old new  
     1#!/bin/sh
     2########################################################################
     3# Begin $rc_base/init.d/avahi
     4#
     5# Description : Avahi daemon loader
     6#
     7# Authors     : William Immendorf - will.immendorf@gmail.com, with some fixes by BLFS Trac user Ringlis.
     8#
     9# Version     : 00.00
     10#
     11# Notes       : Based off of the LFS 6.4 sysklogd script. This controlls all but the AutoIP daemon (I haven't been able to start that).
     12#
     13########################################################################
     14
     15. /etc/sysconfig/rc
     16. ${rc_functions}
     17
     18case "${1}" in
     19        start)
     20                boot_mesg "Starting the Avahi daemon..."
     21                loadproc avahi-daemon -D
     22
     23                boot_mesg "Starting the Avahi mDNS/DNS-SD Server Conf. Daemon..."
     24                loadproc avahi-dnsconfd -D
     25                ;;
     26
     27        stop)
     28                boot_mesg "Stopping the Avahi mDNS/DNS-SD Server Conf. Daemon..."
     29                avahi-dnsconfd -k
     30                evaluate_retval
     31
     32                boot_mesg "Stopping the Avahi daemon..."
     33                avahi-daemon -k
     34                evaluate_retval
     35                ;;
     36
     37        reload)
     38                boot_mesg "Reloading the Avahi mDNS/DNS-SD Server Conf. Daemon..."
     39                reloadproc avahi-dnsconfd -r
     40
     41                boot_mesg "Reloading the Avahi daemon..."
     42                reloadproc avahi-daemon -r
     43                ;;
     44        restart)
     45                ${0} stop
     46                sleep 1
     47                ${0} start
     48                ;;
     49
     50        status)
     51                statusproc avahi-daemon
     52                statusproc avahi-dnsconfd
     53                ;;
     54        *)
     55                echo "Usage: ${0} {start|stop|reload|restart|status}"
     56                exit 1
     57                ;;
     58esac
     59
     60# End $rc_base/init.d/avahi
  • initscript/lfs/avahi.in

    diff -Naur avahi-0.6.25.orig/initscript/lfs/avahi.in avahi-0.6.25/initscript/lfs/avahi.in
    old new  
    1 #!/bin/sh
    2 ########################################################################
    3 # Begin $rc_base/init.d/avahi
    4 #
    5 # Description : Avahi daemon loader
    6 #
    7 # Authors     : William Immendorf - will.immendorf@gmail.com
    8 #
    9 # Version     : 00.00
    10 #
    11 # Notes       : Based off of the LFS 6.4 sysklogd script.
    12 #
    13 ########################################################################
    14 
    15 . /etc/sysconfig/rc
    16 . ${rc_functions}
    17 
    18 case "${1}" in
    19         start)
    20                 boot_mesg "Starting the Avahi daemon..."
    21                 loadproc avahi-daemon -D
    22                 ;;
    23 
    24         stop)
    25                 boot_mesg "Stopping the Avahi daemon..."
    26                 avahi-daemon -k
    27                 evaluate_retval
    28                 ;;
    29 
    30         reload)
    31                 boot_mesg "Reloading the Avahi daemon..."
    32                 reloadproc avahi-daemon -r
    33                 ;;
    34         restart)
    35                 ${0} stop
    36                 sleep 1
    37                 ${0} start
    38                 ;;
    39 
    40         status)
    41                 statusproc avahi-daemon
    42                 ;;
    43         *)
    44                 echo "Usage: ${0} {start|stop|reload|restart|status}"
    45                 exit 1
    46                 ;;
    47 esac
    48 
    49 # End $rc_base/init.d/avahi
  • initscript/lfs/Makefile.am

    diff -Naur avahi-0.6.25.orig/initscript/lfs/Makefile.am avahi-0.6.25/initscript/lfs/Makefile.am
    old new  
    1919
    2020initddir = $(sysconfdir)/rc.d/init.d
    2121
    22 EXTRA_DIST = avahi.in
    23 
    2422initd_SCRIPTS = avahi
    2523
    2624CLEANFILES = avahi
    2725
    28 avahi: avahi.in
    29         chmod +x $@
     26avahi:
     27        chmod +x avahi
     28
     29install: install-am
     30        ln -sf ../init.d/avahi /etc/rc.d/rc0.d/K28avahi
     31        ln -sf ../init.d/avahi /etc/rc.d/rc1.d/K28avahi
     32        ln -sf ../init.d/avahi /etc/rc.d/rc2.d/K49avahi
     33        ln -sf ../init.d/avahi /etc/rc.d/rc3.d/S21avahi
     34        ln -sf ../init.d/avahi /etc/rc.d/rc4.d/S21avahi
     35        ln -sf ../init.d/avahi /etc/rc.d/rc5.d/S21avahi
     36        ln -sf ../init.d/avahi /etc/rc.d/rc6.d/K28avahi