The Samba-Bugzilla – Attachment 12623 Details for
Bug 12402
systemd improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
systemd: Move PIDFile to /var/run/samba where --with-fhs is used
Move-pidfile.patch (text/plain), 8.94 KB, created by
Mathieu Parent
on 2016-11-01 14:26:13 UTC
(
hide
)
Description:
systemd: Move PIDFile to /var/run/samba where --with-fhs is used
Filename:
MIME Type:
Creator:
Mathieu Parent
Created:
2016-11-01 14:26:13 UTC
Size:
8.94 KB
patch
obsolete
>From 64bd16db8fcd165ad987978e6587071605534082 Mon Sep 17 00:00:00 2001 >From: Mathieu Parent <math.parent@gmail.com> >Date: Tue, 1 Nov 2016 14:29:48 +0100 >Subject: [PATCH] systemd: Move PIDFile to /var/run/samba where --with-fhs is > used > >Note that /var/run is a symlink to /run when systemd is used. > >Signed-off-by: Mathieu Parent <math.parent@gmail.com> >--- > packaging/RHEL-CTDB/configure.rpm | 2 +- > packaging/RHEL-CTDB/samba.spec.tmpl | 2 +- > packaging/RHEL-CTDB/setup/samba.log | 2 +- > packaging/RHEL-CTDB/setup/smb.init | 5 +++-- > packaging/RHEL-CTDB/setup/winbind.init | 3 ++- > packaging/RHEL/samba.spec.tmpl | 2 +- > packaging/RHEL/setup/samba.log | 2 +- > packaging/RHEL/setup/smb.init | 7 ++++--- > packaging/RHEL/setup/winbind.init | 3 ++- > packaging/systemd/nmb.service | 2 +- > packaging/systemd/samba.conf.tmp | 2 +- > packaging/systemd/samba.service | 2 +- > packaging/systemd/smb.service | 2 +- > packaging/systemd/winbind.service | 2 +- > 14 files changed, 21 insertions(+), 17 deletions(-) > >diff --git a/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm >index a2d35ea..c7fc474 100755 >--- a/packaging/RHEL-CTDB/configure.rpm >+++ b/packaging/RHEL-CTDB/configure.rpm >@@ -42,7 +42,7 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \ > --with-lockdir=/var/lib/samba \ > --with-logfilebase=/var/log/samba \ > --mandir=${_mandir} \ >- --with-piddir=/var/run \ >+ --with-piddir=/var/run/samba \ > --with-privatedir=${_sysconfdir}/samba \ > --with-sambabook=${_datadir}/swat/using_samba \ > --with-swatdir=${_datadir}/swat \ >diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl >index 6380158..81386f2 100644 >--- a/packaging/RHEL-CTDB/samba.spec.tmpl >+++ b/packaging/RHEL-CTDB/samba.spec.tmpl >@@ -162,7 +162,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ > --with-lockdir=/var/lib/samba \ > --with-logfilebase=/var/log/samba \ > --mandir=%{_mandir} \ >- --with-piddir=/var/run \ >+ --with-piddir=/var/run/samba \ > --with-privatedir=%{_sysconfdir}/samba \ > --disable-cups \ > --with-acl-support \ >diff --git a/packaging/RHEL-CTDB/setup/samba.log b/packaging/RHEL-CTDB/setup/samba.log >index a3c000e..6248123 100644 >--- a/packaging/RHEL-CTDB/setup/samba.log >+++ b/packaging/RHEL-CTDB/setup/samba.log >@@ -4,6 +4,6 @@ > sharedscripts > copytruncate > postrotate >- /bin/kill -HUP `cat /var/run/smbd.pid /var/run/nmbd.pid /var/run/winbindd.pid 2> /dev/null` 2> /dev/null || true >+ /bin/kill -HUP `cat /var/run/samba/smbd.pid /var/run/samba/nmbd.pid /var/run/samba/winbindd.pid 2> /dev/null` 2> /dev/null || true > endscript > } >diff --git a/packaging/RHEL-CTDB/setup/smb.init b/packaging/RHEL-CTDB/setup/smb.init >index 39bf0a8..8f4387d 100644 >--- a/packaging/RHEL-CTDB/setup/smb.init >+++ b/packaging/RHEL-CTDB/setup/smb.init >@@ -53,6 +53,7 @@ RETVAL=0 > start() { > KIND="SMB" > echo -n $"Starting $KIND services: " >+ install -o root -g root -m 755 -d /var/run/samba > daemon smbd $SMBDOPTIONS > RETVAL=$? > echo >@@ -76,14 +77,14 @@ stop() { > echo -n $"Shutting down $KIND services: " > killproc smbd > RETVAL=$? >- [ $RETVAL -eq 0 ] && rm -f /var/run/smbd.pid >+ [ $RETVAL -eq 0 ] && rm -f /var/run/samba/smbd.pid > echo > KIND="NMB" > if [ x"$ISNETBIOSDISABLED" != x"Yes" ]; then > echo -n $"Shutting down $KIND services: " > killproc nmbd > RETVAL2=$? >- [ $RETVAL2 -eq 0 ] && rm -f /var/run/nmbd.pid >+ [ $RETVAL2 -eq 0 ] && rm -f /var/run/samba/nmbd.pid > [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb > echo "" > else >diff --git a/packaging/RHEL-CTDB/setup/winbind.init b/packaging/RHEL-CTDB/setup/winbind.init >index 2a9dd82..4f86fed 100644 >--- a/packaging/RHEL-CTDB/setup/winbind.init >+++ b/packaging/RHEL-CTDB/setup/winbind.init >@@ -40,6 +40,7 @@ RETVAL=0 > start() { > KIND="Winbind" > echo -n $"Starting $KIND services: " >+ install -o root -g root -m 755 -d /var/run/samba > daemon winbindd "$WINBINDOPTIONS" > RETVAL=$? > echo >@@ -53,7 +54,7 @@ stop() { > echo -n $"Shutting down $KIND services: " > killproc winbindd > RETVAL=$? >- [ $RETVAL -eq 0 ] && rm -f /var/run/winbindd.pid && rm -f /var/lock/subsys/winbindd >+ [ $RETVAL -eq 0 ] && rm -f /var/run/samba/winbindd.pid && rm -f /var/lock/subsys/winbindd > echo "" > return $RETVAL > } >diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl >index bb8ff11..a9facf5 100644 >--- a/packaging/RHEL/samba.spec.tmpl >+++ b/packaging/RHEL/samba.spec.tmpl >@@ -156,7 +156,7 @@ CC="$CC" CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ > --with-lockdir=/var/lib/samba \ > --with-logfilebase=/var/log/samba \ > --with-mandir=%{_mandir} \ >- --with-piddir=/var/run \ >+ --with-piddir=/var/run/samba \ > --with-privatedir=%{_sysconfdir}/samba \ > --with-sambabook=%{_datadir}/swat/using_samba \ > --with-swatdir=%{_datadir}/swat \ >diff --git a/packaging/RHEL/setup/samba.log b/packaging/RHEL/setup/samba.log >index a3c000e..6248123 100644 >--- a/packaging/RHEL/setup/samba.log >+++ b/packaging/RHEL/setup/samba.log >@@ -4,6 +4,6 @@ > sharedscripts > copytruncate > postrotate >- /bin/kill -HUP `cat /var/run/smbd.pid /var/run/nmbd.pid /var/run/winbindd.pid 2> /dev/null` 2> /dev/null || true >+ /bin/kill -HUP `cat /var/run/samba/smbd.pid /var/run/samba/nmbd.pid /var/run/samba/winbindd.pid 2> /dev/null` 2> /dev/null || true > endscript > } >diff --git a/packaging/RHEL/setup/smb.init b/packaging/RHEL/setup/smb.init >index 96fb74a..f8a02b2 100644 >--- a/packaging/RHEL/setup/smb.init >+++ b/packaging/RHEL/setup/smb.init >@@ -51,7 +51,8 @@ RETVAL=0 > > start() { > KIND="SMB" >- echo -n $"Starting $KIND services: " >+ necho -n $"Starting $KIND services: " >+ install -o root -g root -m 755 -d /var/run/samba > daemon smbd $SMBDOPTIONS > RETVAL=$? > echo >@@ -75,14 +76,14 @@ stop() { > echo -n $"Shutting down $KIND services: " > killproc smbd > RETVAL=$? >- [ $RETVAL -eq 0 ] && rm -f /var/run/smbd.pid >+ [ $RETVAL -eq 0 ] && rm -f /var/run/samba/smbd.pid > echo > KIND="NMB" > if [ x"$ISNETBIOSDISABLED" != x"Yes" ]; then > echo -n $"Shutting down $KIND services: " > killproc nmbd > RETVAL2=$? >- [ $RETVAL2 -eq 0 ] && rm -f /var/run/nmbd.pid >+ [ $RETVAL2 -eq 0 ] && rm -f /var/run/samba/nmbd.pid > [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb > echo "" > else >diff --git a/packaging/RHEL/setup/winbind.init b/packaging/RHEL/setup/winbind.init >index 2a9dd82..4f86fed 100644 >--- a/packaging/RHEL/setup/winbind.init >+++ b/packaging/RHEL/setup/winbind.init >@@ -40,6 +40,7 @@ RETVAL=0 > start() { > KIND="Winbind" > echo -n $"Starting $KIND services: " >+ install -o root -g root -m 755 -d /var/run/samba > daemon winbindd "$WINBINDOPTIONS" > RETVAL=$? > echo >@@ -53,7 +54,7 @@ stop() { > echo -n $"Shutting down $KIND services: " > killproc winbindd > RETVAL=$? >- [ $RETVAL -eq 0 ] && rm -f /var/run/winbindd.pid && rm -f /var/lock/subsys/winbindd >+ [ $RETVAL -eq 0 ] && rm -f /var/run/samba/winbindd.pid && rm -f /var/lock/subsys/winbindd > echo "" > return $RETVAL > } >diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service >index 71cf1c2..30d3c39 100644 >--- a/packaging/systemd/nmb.service >+++ b/packaging/systemd/nmb.service >@@ -7,7 +7,7 @@ Wants=network-online.target > [Service] > Type=notify > NotifyAccess=all >-PIDFile=/run/nmbd.pid >+PIDFile=/run/samba/nmbd.pid > EnvironmentFile=-/etc/sysconfig/samba > ExecStart=/usr/sbin/nmbd $NMBDOPTIONS > ExecReload=/bin/kill -HUP $MAINPID >diff --git a/packaging/systemd/samba.conf.tmp b/packaging/systemd/samba.conf.tmp >index 8a29577..edb77ad 100644 >--- a/packaging/systemd/samba.conf.tmp >+++ b/packaging/systemd/samba.conf.tmp >@@ -1 +1 @@ >-d /var/run/samba 755 root root >+d /run/samba 0755 root root - >diff --git a/packaging/systemd/samba.service b/packaging/systemd/samba.service >index 11d2e47..f8da1d2 100644 >--- a/packaging/systemd/samba.service >+++ b/packaging/systemd/samba.service >@@ -6,7 +6,7 @@ After=network.target > [Service] > Type=notify > NotifyAccess=all >-PIDFile=/run/samba.pid >+PIDFile=/run/samba/samba.pid > LimitNOFILE=16384 > EnvironmentFile=-/etc/sysconfig/samba > ExecStart=/usr/sbin/samba $SAMBAOPTIONS >diff --git a/packaging/systemd/smb.service b/packaging/systemd/smb.service >index cc7831c..ed93311 100644 >--- a/packaging/systemd/smb.service >+++ b/packaging/systemd/smb.service >@@ -6,7 +6,7 @@ After=network.target nmb.service winbind.service > [Service] > Type=notify > NotifyAccess=all >-PIDFile=/run/smbd.pid >+PIDFile=/run/samba/smbd.pid > LimitNOFILE=16384 > EnvironmentFile=-/etc/sysconfig/samba > ExecStart=/usr/sbin/smbd $SMBDOPTIONS >diff --git a/packaging/systemd/winbind.service b/packaging/systemd/winbind.service >index e7f1651..1007339 100644 >--- a/packaging/systemd/winbind.service >+++ b/packaging/systemd/winbind.service >@@ -6,7 +6,7 @@ After=network.target nmb.service > [Service] > Type=notify > NotifyAccess=all >-PIDFile=/run/winbindd.pid >+PIDFile=/run/samba/winbindd.pid > EnvironmentFile=-/etc/sysconfig/samba > ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS" > ExecReload=/bin/kill -HUP $MAINPID >-- >2.10.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12402
:
12613
|
12614
|
12615
|
12616
|
12618
|
12622
|
12623
|
12624