1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-26 18:50:30 +03:00

If samba fails to start for some reason, make this cause the startup event to fail too, so that ctdbd will re-try the startup event later.

Or else this will leave samba not running.

CQ S1023394

(This used to be ctdb commit f90485b08d32cbe56050718a3b28ca0fe1d64e0f)
This commit is contained in:
Ronnie Sahlberg 2011-05-10 08:25:27 +10:00
parent ee9e137759
commit d1edf44e4f

View File

@ -65,7 +65,11 @@ start_samba() {
# start the winbind service
[ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
service "$CTDB_SERVICE_WINBIND" start
service "$CTDB_SERVICE_WINBIND" start || {
echo failed to start winbind
exit 1
}
}
# start Samba service. Start it reniced, as under very heavy load
@ -74,8 +78,15 @@ start_samba() {
[ "$CTDB_MANAGES_SAMBA" = "yes" ] && {
/usr/bin/net serverid wipe
nice_service "$CTDB_SERVICE_NMB" start
nice_service "$CTDB_SERVICE_SMB" start
nice_service "$CTDB_SERVICE_NMB" start || {
echo failed to start nmbd
exit 1
}
nice_service "$CTDB_SERVICE_SMB" start || {
echo failed to start samba
exit 1
}
}
return 0
}