diff --git a/nmb.service b/nmb.service deleted file mode 100644 index e5e81a1..0000000 --- a/nmb.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Samba NMB Daemon -After=syslog.target network.target - -[Service] -Type=forking -PIDFile=/run/nmbd.pid -EnvironmentFile=-/etc/sysconfig/samba -ExecStart=/usr/sbin/nmbd $NMBDOPTIONS -ExecReload=/usr/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target diff --git a/samba-missing-newline.patch b/samba-missing-newline.patch index cb692dd..fce0dde 100644 --- a/samba-missing-newline.patch +++ b/samba-missing-newline.patch @@ -1,5 +1,5 @@ diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c -index 688bedd..4db7b42 100644 +index 688bedd..ea9479c 100644 --- a/lib/util/become_daemon.c +++ b/lib/util/become_daemon.c @@ -125,15 +125,15 @@ _PUBLIC_ void exit_daemon(const char *msg, int error) @@ -19,42 +19,7 @@ index 688bedd..4db7b42 100644 + sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name); #endif - DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve connections", daemon)); -+ DEBUG(2, ("STATUS=daemon '%s' finished starting up and ready to serve connections\n", name)); ++ DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve connections\n", name)); } _PUBLIC_ void daemon_status(const char *name, const char *msg) -diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c -index ae84818..bb3080b 100644 ---- a/source3/nmbd/nmbd.c -+++ b/source3/nmbd/nmbd.c -@@ -54,7 +54,7 @@ struct tevent_context *nmbd_event_context(void) - - static void terminate(struct messaging_context *msg) - { -- DEBUG(0,("Got SIGTERM: going down...\n")); -+ DEBUG(2,("Got SIGTERM: going down...\n")); - - /* Write out wins.dat file if samba is a WINS server */ - wins_write_database(0,False); -@@ -946,7 +946,7 @@ static bool open_sockets(bool isdaemon, int port) - set_samba_nb_type(); - - if (!is_daemon && !is_a_socket(0)) { -- DEBUG(0,("standard input is not a socket, assuming -D option\n")); -+ DEBUG(1,("standard input is not a socket, assuming -D option\n")); - is_daemon = True; - } - -diff --git a/source3/smbd/server.c b/source3/smbd/server.c -index 8856f43..01ea41d 100644 ---- a/source3/smbd/server.c -+++ b/source3/smbd/server.c -@@ -1266,7 +1266,7 @@ extern void build_options(bool screen); - - if (!is_daemon && !is_a_socket(0)) { - if (!interactive) -- DEBUG(0,("standard input is not a socket, assuming -D option\n")); -+ DEBUG(1,("standard input is not a socket, assuming -D option\n")); - - /* - * Setting is_daemon here prevents us from eventually calling diff --git a/samba.service b/samba.service deleted file mode 100644 index e2878d1..0000000 --- a/samba.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Samba AD Daemon -After=syslog.target network.target - -[Service] -Type=forking -PIDFile=/run/samba.pid -LimitNOFILE=16384 -EnvironmentFile=-/etc/sysconfig/samba -ExecStart=/usr/sbin/samba $SAMBAOPTIONS -ExecReload=/usr/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target diff --git a/samba.spec b/samba.spec index a9dbaaa..19eef45 100644 --- a/samba.spec +++ b/samba.spec @@ -128,10 +128,6 @@ Source23: findsmb Source26: wrepld.init Source28: samba.pamd Source29: system-auth-winbind.pamd -Source30: nmb.service -Source31: samba.service -Source32: smb.service -Source33: winbind.service Source41: openldap-samba.conf Source100: %{name}.rpmlintrc # xdr_* functions have moved from glibc into libtirpc @@ -1666,14 +1662,11 @@ EOF mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig # cp -a packaging/systemd/*.service %{buildroot}%{_unitdir}/ -cp %{SOURCE30} %{buildroot}%{_unitdir}/ -cp %{SOURCE31} %{buildroot}%{_unitdir}/ -cp %{SOURCE32} %{buildroot}%{_unitdir}/ -cp %{SOURCE33} %{buildroot}%{_unitdir}/ cp -a packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba install -d -m 0755 %{buildroot}%{_prefix}/lib/tmpfiles.d/ install -m644 packaging/systemd/samba.conf.tmp %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf +install -m644 packaging/systemd/*.service %{buildroot}%{_unitdir}/ # create /run/samba too. echo "d /run/samba 755 root root" >> %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf diff --git a/smb.service b/smb.service deleted file mode 100644 index 98b8c49..0000000 --- a/smb.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Samba SMB Daemon -After=syslog.target network.target nmb.service winbind.service - -[Service] -Type=forking -PIDFile=/var/run/smbd.pid -LimitNOFILE=16384 -EnvironmentFile=-/etc/sysconfig/samba -ExecStart=/usr/sbin/smbd $SMBDOPTIONS -ExecReload=/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target diff --git a/winbind.service b/winbind.service deleted file mode 100644 index eff266f..0000000 --- a/winbind.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Samba Winbind Daemon -After=syslog.target network.target nmb.service - -[Service] -Type=forking -PIDFile=/run/winbindd.pid -EnvironmentFile=-/etc/sysconfig/samba -ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS" -ExecReload=/usr/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target