[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openpkg-cvs
Subject:    [CVS] OpenPKG: openpkg-src/samba/ rc.samba samba.patch samba.spec
From:       "Torsten Homeyer" <tho () openpkg ! org>
Date:       2004-07-29 7:48:22
Message-ID: 20040729074822.9992B30389D () mail ! openpkg ! org
[Download RAW message or body]

  OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Torsten Homeyer
  Root:   /e/openpkg/cvs                   Email:  tho@openpkg.org
  Module: openpkg-src                      Date:   29-Jul-2004 09:48:22
  Branch: HEAD                             Handle: 2004072908482100

  Modified files:
    openpkg-src/samba       rc.samba samba.patch samba.spec

  Log:
    added more flexible way of starting daemons; fixed access privileges
    to athentication socket of winbindd

  Summary:
    Revision    Changes     Path
    1.18        +31 -18     openpkg-src/samba/rc.samba
    1.5         +12 -0      openpkg-src/samba/samba.patch
    1.73        +1  -1      openpkg-src/samba/samba.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/samba/rc.samba
  ============================================================================
  $ cvs diff -u -r1.17 -r1.18 rc.samba
  --- openpkg-src/samba/rc.samba	6 Jul 2004 11:18:29 -0000	1.17
  +++ openpkg-src/samba/rc.samba	29 Jul 2004 07:48:21 -0000	1.18
  @@ -5,6 +5,7 @@
   
   %config
       samba_enable="$openpkg_rc_def"
  +    samba_daemons="smbd nmbd"
       samba_log_prolog="true"
       samba_log_epilog="true"
       samba_log_numfiles="10"
  @@ -12,23 +13,22 @@
       samba_log_complevel="9"
   
   %common
  -    samba_smbd_pidfile="@l_prefix@/var/samba/run/smbd.pid"
  -    samba_nmbd_pidfile="@l_prefix@/var/samba/run/nmbd.pid"
       samba_signal () {
  -        [ -f $samba_smbd_pidfile ] \
  -        && kill -$1 `cat $samba_smbd_pidfile`
  -        local rc=$?
  -
  -        [ -f $samba_nmbd_pidfile ] \
  -        && kill -$1 `cat $samba_nmbd_pidfile` \
  -        && [ $rc -eq 0 ]
  +        local retcode=0
  +        local dAemons=
  +        for dAemons in $samba_daemons; do
  +            [ -f @l_prefix@/var/samba/run/${dAemons}.pid ] \
  +            && kill -$1 `cat @l_prefix@/var/samba/run/${dAemons}.pid`
  +            retcode=$(($retcode+$?))
  +        done
  +        return $retcode
       }
   
   %status -u @l_susr@ -o
       samba_usable="unknown"
       samba_active="no"
       rcService samba enable yes && \
  -        samba_signal 0 && samba_active="yes"
  +    samba_signal 0 && samba_active="yes"
       echo "samba_enable=\"$samba_enable\""
       echo "samba_usable=\"$samba_usable\""
       echo "samba_active=\"$samba_active\""
  @@ -36,19 +36,30 @@
   %start -u @l_susr@
       rcService samba enable yes || exit 0
       rcService samba active yes && exit 0
  -    @l_prefix@/sbin/smbd -D
  -    @l_prefix@/sbin/nmbd -D
  +    for dAemons in $samba_daemons; do
  +        case $dAemons in
  +            ?mbd)
  +                @l_prefix@/sbin/$dAemons -D
  +                ;;
  +            winbindd)
  +                @l_prefix@/sbin/$dAemons -B
  +                ;;
  +            *)
  +                @l_prefix@/sbin/$dAemons
  +                ;;
  +        esac
  +    done
   
   %stop -u @l_susr@
       rcService samba enable yes || exit 0
  -    rcService samba active no  && exit 0
       samba_signal TERM
       sleep 2
  -    rm -f $samba_smbd_pidfile $samba_nmbd_pidfile 2>/dev/null || true
  +    for dAemons in $samba_daemons; do
  +        rm -f @l_prefix@/var/samba/run/${dAemons}.pid
  +    done
   
   %restart -u @l_susr@
       rcService samba enable yes || exit 0
  -    rcService samba active no  && exit 0
       rc samba stop start
   
   %reload -u @l_susr@
  @@ -58,12 +69,14 @@
   
   %daily -u @l_susr@
       rcService samba enable yes || exit 0
  -
  -    #   rotate logfile
  +    Logfiles=
  +    for dAemons in $samba_daemons; do
  +        Logfiles="$Logfiles @l_prefix@/var/samba/run/log.$dAemons"
  +    done
       shtool rotate -f \
           -n ${samba_log_numfiles} -s ${samba_log_minsize} -d \
           -z ${samba_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
           -P "${samba_log_prolog}" \
           -E "${samba_log_epilog}; rc samba restart" \
  -        @l_prefix@/var/samba/run/log.[sn]mbd
  +        $Logfiles
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/samba/samba.patch
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 samba.patch
  --- openpkg-src/samba/samba.patch	5 Jul 2004 08:17:47 -0000	1.4
  +++ openpkg-src/samba/samba.patch	29 Jul 2004 07:48:21 -0000	1.5
  @@ -226,3 +226,15 @@
    		return False;
    	}
    
  +Index: source/nsswitch/winbindd_util.c
  +--- source/nsswitch/winbindd_util.c.orig	2004-07-20 18:28:01 +0200
  ++++ source/nsswitch/winbindd_util.c	2004-07-28 14:54:12 +0200
  +@@ -680,7 +680,7 @@
  + {
  + 	if (_winbindd_priv_socket == -1) {
  + 		_winbindd_priv_socket = create_pipe_sock(
  +-			get_winbind_priv_pipe_dir(), WINBINDD_SOCKET_NAME, 0750);
  ++			get_winbind_priv_pipe_dir(), WINBINDD_SOCKET_NAME, 0755);
  + 		DEBUG(10, ("open_winbindd_priv_socket: opened socket fd %d\n",
  + 			   _winbindd_priv_socket));
  + 	}
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/samba/samba.spec
  ============================================================================
  $ cvs diff -u -r1.72 -r1.73 samba.spec
  --- openpkg-src/samba/samba.spec	22 Jul 2004 08:12:01 -0000	1.72
  +++ openpkg-src/samba/samba.spec	29 Jul 2004 07:48:21 -0000	1.73
  @@ -34,7 +34,7 @@
   Group:        Filesystem
   License:      GPL
   Version:      3.0.5
  -Release:      20040722
  +Release:      20040729
   
   #   package options
   %option       with_pam  no
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic