summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/bareos/files')
-rw-r--r--app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch24
-rw-r--r--app-backup/bareos/files/bareos-21-cmake-gentoo.patch12
-rw-r--r--app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch25
-rw-r--r--app-backup/bareos/files/bareos-21.1.2-werror.patch23
-rw-r--r--app-backup/bareos/files/bareos-22.0.2-werror.patch23
-rw-r--r--app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch41
-rw-r--r--app-backup/bareos/files/bareos-cmake-gentoo.patch11
-rw-r--r--app-backup/bareos/files/bareos-cmake-rados.patch21
-rw-r--r--app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch9
-rw-r--r--app-backup/bareos/files/bareos-dir-21-r1.initd16
-rw-r--r--app-backup/bareos/files/bareos-dir-21.confd (renamed from app-backup/bareos/files/bareos-dir.confd)9
-rw-r--r--app-backup/bareos/files/bareos-dir-21.service (renamed from app-backup/bareos/files/bareos-dir.service)4
-rw-r--r--app-backup/bareos/files/bareos-dir.initd30
-rw-r--r--app-backup/bareos/files/bareos-fd-21-r1.initd12
-rw-r--r--app-backup/bareos/files/bareos-fd-21.confd (renamed from app-backup/bareos/files/bareos-fd.confd)2
-rw-r--r--app-backup/bareos/files/bareos-fd.initd21
-rw-r--r--app-backup/bareos/files/bareos-sd-21-r1.initd16
-rw-r--r--app-backup/bareos/files/bareos-sd-21.confd (renamed from app-backup/bareos/files/bareos-sd.confd)2
-rw-r--r--app-backup/bareos/files/bareos-sd.initd30
19 files changed, 174 insertions, 157 deletions
diff --git a/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch b/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch
deleted file mode 100644
index 9d3cf8092e1c..000000000000
--- a/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -urw bareos-Release-20.0.2.orig/core/cmake/distname.sh bareos-Release-20.0.2/core/cmake/distname.sh
---- bareos-Release-20.0.2.orig/core/cmake/distname.sh 2021-06-10 06:07:18.000000000 -0930
-+++ bareos-Release-20.0.2/core/cmake/distname.sh 2021-08-15 17:07:37.168216517 -0930
-@@ -153,7 +153,7 @@
- elif test -f /etc/gentoo-release
- then
- PLATFORM=gentoo
-- DISTVER=`awk '/version / { print $5 }' < /etc/gentoo-release`
-+ DISTVER=`awk '/release / { print $5 }' < /etc/gentoo-release`
- elif test -f /etc/debian_version
- then
- if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
-diff -urw bareos-Release-20.0.2.orig/core/platforms/CMakeLists.txt bareos-Release-20.0.2/core/platforms/CMakeLists.txt
---- bareos-Release-20.0.2.orig/core/platforms/CMakeLists.txt 2021-06-10 06:07:18.000000000 -0930
-+++ bareos-Release-20.0.2/core/platforms/CMakeLists.txt 2021-08-15 17:07:37.549226558 -0930
-@@ -30,6 +30,8 @@
- message(STATUS "adding subdirectories debian and univention")
- add_subdirectory(debian)
- add_subdirectory(univention)
-+ elseif(${PLATFORM} STREQUAL gentoo)
-+ message(STATUS "PLATFORM: " ${PLATFORM})
- elseif(${PLATFORM} STREQUAL hpux)
- message(STATUS "PLATFORM: " ${PLATFORM})
- elseif(${PLATFORM} STREQUAL archlinux)
diff --git a/app-backup/bareos/files/bareos-21-cmake-gentoo.patch b/app-backup/bareos/files/bareos-21-cmake-gentoo.patch
new file mode 100644
index 000000000000..e42bf91a91fd
--- /dev/null
+++ b/app-backup/bareos/files/bareos-21-cmake-gentoo.patch
@@ -0,0 +1,12 @@
+diff -ur bareos-Release-21.0.0.orig/core/platforms/CMakeLists.txt bareos-Release-21.0.0/core/platforms/CMakeLists.txt
+--- bareos-Release-21.0.0.orig/core/platforms/CMakeLists.txt 2021-12-21 01:00:49.000000000 -1000
++++ bareos-Release-21.0.0/core/platforms/CMakeLists.txt 2022-01-30 15:09:41.949529813 -1000
+@@ -30,6 +30,8 @@
+ message(STATUS "adding subdirectories debian and univention")
+ add_subdirectory(debian)
+ add_subdirectory(univention)
++ elseif(${PLATFORM} STREQUAL gentoo)
++ message(STATUS "PLATFORM: " ${PLATFORM})
+ elseif(${BAREOS_PLATFORM} STREQUAL hpux)
+ message(STATUS "BAREOS_PLATFORM: " ${BAREOS_PLATFORM})
+ elseif(${BAREOS_PLATFORM} STREQUAL archlinux)
diff --git a/app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch b/app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch
new file mode 100644
index 000000000000..22cdc2a41c36
--- /dev/null
+++ b/app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch
@@ -0,0 +1,25 @@
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -44,12 +44,6 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME common)
+
+ include(GNUInstallDirs)
+
+-find_program(CCACHE_FOUND ccache)
+-if(CCACHE_FOUND)
+- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+- set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+-endif(CCACHE_FOUND)
+-
+ # switch on CXX 17 Support
+ #
+ set(CMAKE_CXX_STANDARD 17)
+@@ -584,9 +578,6 @@ message(STATUS "CMAKE_SUPPRESS_REGENERATION: " ${CMAKE_SUPPRESS_REGENERATION})
+ # A simple way to get switches to the compiler is to use ADD_DEFINITIONS(). But
+ # there are also two variables exactly for this purpose:
+
+-# wheter or not
+-message(STATUS "CCACHE_FOUND: " ${CCACHE_FOUND})
+-
+ # Choose the type of build. Example: SET(CMAKE_BUILD_TYPE Debug)
+ message(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE})
+
diff --git a/app-backup/bareos/files/bareos-21.1.2-werror.patch b/app-backup/bareos/files/bareos-21.1.2-werror.patch
new file mode 100644
index 000000000000..10de9f1415b6
--- /dev/null
+++ b/app-backup/bareos/files/bareos-21.1.2-werror.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/841734
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -96,7 +96,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ -Werror=format-security compiler_error_format_security
+ )
+ if(${compiler_error_format_security})
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=format-security")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat-security")
+ endif()
+ endif()
+
+@@ -353,8 +353,8 @@ if(developer)
+ add_definitions("-DDEVELOPER=1")
+ endif()
+
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+
+ include(BareosSetVariableDefaults)
+ option(ENABLE_BCONSOLE "Build bconsole binary" ON)
diff --git a/app-backup/bareos/files/bareos-22.0.2-werror.patch b/app-backup/bareos/files/bareos-22.0.2-werror.patch
new file mode 100644
index 000000000000..43f2aa5ad7d9
--- /dev/null
+++ b/app-backup/bareos/files/bareos-22.0.2-werror.patch
@@ -0,0 +1,23 @@
+diff -urN bareos-Release-22.0.2.orig/core/CMakeLists.txt bareos-Release-22.0.2/core/CMakeLists.txt
+--- bareos-Release-22.0.2.orig/core/CMakeLists.txt 2023-02-07 15:30:01.000000000 +0530
++++ bareos-Release-22.0.2/core/CMakeLists.txt 2023-03-01 23:06:39.577048453 +0530
+@@ -104,7 +104,7 @@
+ -Werror=format-security compiler_error_format_security
+ )
+ if(${compiler_error_format_security})
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=format-security")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat-security")
+ endif()
+ endif()
+
+@@ -394,8 +394,8 @@
+ add_definitions("-DDEVELOPER=1")
+ endif()
+
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+
+ include(BareosSetVariableDefaults)
+ option(ENABLE_BCONSOLE "Build bconsole binary" ON)
diff --git a/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch b/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch
new file mode 100644
index 000000000000..5f71576bc001
--- /dev/null
+++ b/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch
@@ -0,0 +1,41 @@
+From https://github.com/bareos/bareos/pull/1687/commits/3907be7ff9700d0328198b47c58885f5ec56546c
+https://bugs.gentoo.org/920489
+
+diff --git a/core/src/cats/sql_get.cc b/core/src/cats/sql_get.cc
+index b5d921c..150ebfc 100644
+--- a/core/src/cats/sql_get.cc
++++ b/core/src/cats/sql_get.cc
+@@ -31,6 +31,7 @@
+ */
+
+ #include "include/bareos.h"
++#include <algorithm>
+
+ #if HAVE_SQLITE3 || HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_INGRES || HAVE_DBI
+
+diff --git a/core/src/stored/append.cc b/core/src/stored/append.cc
+index 05f6784..32234d4 100644
+--- a/core/src/stored/append.cc
++++ b/core/src/stored/append.cc
+@@ -41,6 +41,8 @@
+ #include "lib/berrno.h"
+ #include "lib/berrno.h"
+
++#include <algorithm>
++
+ namespace storagedaemon {
+
+ /* Responses sent to the daemon */
+diff --git a/core/src/dird/ua_prune.cc b/core/src/dird/ua_prune.cc
+index 9a0770c..15a0a56 100644
+--- a/core/src/dird/ua_prune.cc
++++ b/core/src/dird/ua_prune.cc
+@@ -40,6 +40,8 @@
+ #include "lib/edit.h"
+ #include "lib/parse_conf.h"
+
++#include <algorithm>
++
+ namespace directordaemon {
+
+ /* Forward referenced functions */
diff --git a/app-backup/bareos/files/bareos-cmake-gentoo.patch b/app-backup/bareos/files/bareos-cmake-gentoo.patch
deleted file mode 100644
index 0f67a9e5d9de..000000000000
--- a/app-backup/bareos/files/bareos-cmake-gentoo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- core/cmake/distname.sh.orig 2019-01-31 12:39:26.000000000 +0100
-+++ core/cmake/distname.sh 2019-02-05 10:26:43.258936535 +0100
-@@ -134,7 +134,7 @@
- elif test -f /etc/gentoo-release
- then
- DISTNAME=gentoo
-- DISTVER=`awk '/version / { print $5 }' < /etc/gentoo-release`
-+ DISTVER=`awk '/release / { print $5 }' < /etc/gentoo-release`
- elif test -f /etc/debian_version
- then
- if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
diff --git a/app-backup/bareos/files/bareos-cmake-rados.patch b/app-backup/bareos/files/bareos-cmake-rados.patch
deleted file mode 100644
index c9a0c176692e..000000000000
--- a/app-backup/bareos/files/bareos-cmake-rados.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- core/cmake/BareosCheckSymbols.cmake.orig 2018-12-05 23:39:37.307627387 +0100
-+++ core/cmake/BareosCheckSymbols.cmake 2018-12-05 23:40:00.999464771 +0100
-@@ -21,7 +21,7 @@
-
-
- CHECK_SYMBOL_EXISTS(__stub_lchmod features.h LCHMOD_IS_A_STUB1)
--CHECK_SYMBOL_EXISTS(__stub___lchmod features_h LCHMOD_IS_A_STUB2)
-+#CHECK_SYMBOL_EXISTS(__stub___lchmod features_h LCHMOD_IS_A_STUB2)
-
-
-
-@@ -43,7 +43,9 @@
-
- cmake_push_check_state()
- SET(CMAKE_REQUIRED_LIBRARIES ${RADOS_LIBRARIES})
-+if ("${HAVE_RADOS}")
- CHECK_SYMBOL_EXISTS(rados_ioctx_set_namespace rados/librados.h HAVE_RADOS_NAMESPACES)
- CHECK_SYMBOL_EXISTS(rados_nobjects_list_open rados/librados.h HAVE_RADOS_NOBJECTS_LIST)
-+endif()
- cmake_pop_check_state()
-
diff --git a/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch b/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch
deleted file mode 100644
index 8c46fdf0dc86..000000000000
--- a/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- work/bareos-Release-18.2.5/core/cmake/bareos-symlink-default-db-backend.cmake.orig 2019-01-31 12:39:26.000000000 +0100
-+++ work/bareos-Release-18.2.5/core/cmake/bareos-symlink-default-db-backend.cmake 2019-02-05 11:00:24.559983661 +0100
-@@ -19,5 +19,5 @@
- MESSAGE(STATUS "${CMAKE_COMMAND} -E create_symlink ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX} ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}")
- execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
- ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION}
-+ $ENV{DESTDIR}/${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION}
- )
diff --git a/app-backup/bareos/files/bareos-dir-21-r1.initd b/app-backup/bareos/files/bareos-dir-21-r1.initd
new file mode 100644
index 000000000000..1363833e8962
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir-21-r1.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ checkpath --directory --owner root:root --mode 00755 /run/bareos
+}
+
+command="/usr/sbin/bareos-dir"
+command_args="-f ${DIR_OPTIONS}"
+command_background="true"
+pidfile="/run/bareos/bareos-dir.9101.pid"
diff --git a/app-backup/bareos/files/bareos-dir.confd b/app-backup/bareos/files/bareos-dir-21.confd
index 6d755bf93344..4e2ee55d8924 100644
--- a/app-backup/bareos/files/bareos-dir.confd
+++ b/app-backup/bareos/files/bareos-dir-21.confd
@@ -1,15 +1,8 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Config file for /etc/init.d/bareos-dir
-# Bareos can use more than one catalog database and each one can
-# be of any supported type.
-# If a database server where you store a bareos catalog
-# is on a different machine, you might want to remove the corresponding
-# type from the rc_need variable.
-rc_need="%databasetypes%"
-
# Options for the director daemon.
# The director can be run as a non-root user, however
# please ensure that this user has proper permissions to
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir-21.service
index f0a611715487..2f156cf8aecc 100644
--- a/app-backup/bareos/files/bareos-dir.service
+++ b/app-backup/bareos/files/bareos-dir-21.service
@@ -7,7 +7,7 @@
Description=Bareos Director Daemon
Documentation=man:bareos-dir(8)
Requires=nss-lookup.target network.target remote-fs.target time-sync.target
-After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service
+After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service
ConditionPathIsDirectory=/var/lib/bareos
[Service]
@@ -23,6 +23,8 @@ ExecStartPre=/usr/sbin/bareos-dir -t -f
#ExecStart=/usr/sbin/bareos-dir
ExecStart=/usr/sbin/bareos-dir -f
SuccessExitStatus=0 1 15
+ExecReload=/usr/sbin/bareos-dir -t -f
+ExecReload=/bin/kill -HUP $MAINPID
#Restart=on-failure
[Install]
diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd
deleted file mode 100644
index 462ff07843a2..000000000000
--- a/app-backup/bareos/files/bareos-dir.initd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- use dns bareos-fd bareos-sd
-}
-
-start() {
- ebegin "Starting bareos director"
- # g+w until #631598 is resolved
- checkpath -d -m 0770 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \
- -- ${DIR_OPTIONS}
- # harden pid file until #631598 is resolved
- ewaitfile 10 /run/bareos/bareos-dir.9101.pid
- chown root:bareos /run/bareos/bareos-dir.9101.pid
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos director"
- # check pid file until #631598 is resolved
- if [[ $(stat -c %U /run/bareos/bareos-dir.9101.pid) != "root" ]]; then
- eerror "SECURITY ALERT: pid file is not root owned anymore?! (see #631598)"
- else
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid
- fi
- eend $?
-}
diff --git a/app-backup/bareos/files/bareos-fd-21-r1.initd b/app-backup/bareos/files/bareos-fd-21-r1.initd
new file mode 100644
index 000000000000..2b752085c764
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd-21-r1.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+command="/usr/sbin/bareos-fd"
+command_args="-f ${DIR_OPTIONS}"
+command_background="true"
+pidfile="/run/bareos/bareos-fd.9102.pid"
diff --git a/app-backup/bareos/files/bareos-fd.confd b/app-backup/bareos/files/bareos-fd-21.confd
index 5e429a6bd31c..407f2a8828eb 100644
--- a/app-backup/bareos/files/bareos-fd.confd
+++ b/app-backup/bareos/files/bareos-fd-21.confd
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Config file for /etc/init.d/bareos-fd
diff --git a/app-backup/bareos/files/bareos-fd.initd b/app-backup/bareos/files/bareos-fd.initd
deleted file mode 100644
index e65e6c80f32b..000000000000
--- a/app-backup/bareos/files/bareos-fd.initd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- use dns
-}
-
-start() {
- ebegin "Starting bareos file daemon"
- checkpath -d -m 0750 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \
- -- ${FD_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos file daemon"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.*.pid
- eend $?
-}
diff --git a/app-backup/bareos/files/bareos-sd-21-r1.initd b/app-backup/bareos/files/bareos-sd-21-r1.initd
new file mode 100644
index 000000000000..d6a5765a74a4
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd-21-r1.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ checkpath --directory --owner root:root --mode 00755 /run/bareos
+}
+
+command="/usr/sbin/bareos-sd"
+command_args="-f ${DIR_OPTIONS}"
+command_background="true"
+pidfile="/run/bareos/bareos-sd.9103.pid"
diff --git a/app-backup/bareos/files/bareos-sd.confd b/app-backup/bareos/files/bareos-sd-21.confd
index d0153b2b30b5..2a67ae2b5523 100644
--- a/app-backup/bareos/files/bareos-sd.confd
+++ b/app-backup/bareos/files/bareos-sd-21.confd
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Config file for /etc/init.d/bareos-sd
diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd
deleted file mode 100644
index 97b9ccdc92f1..000000000000
--- a/app-backup/bareos/files/bareos-sd.initd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- use dns
-}
-
-start() {
- ebegin "Starting bareos storage daemon"
- # g+w until #631598 is resolved
- checkpath -d -m 0770 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
- -- ${SD_OPTIONS}
- # harden pid file until #631598 is resolved
- ewaitfile 10 /run/bareos/bareos-sd.9103.pid
- chown root:bareos /run/bareos/bareos-sd.9103.pid
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos storage daemon"
- # check pid file until #631598 is resolved
- if [[ $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then
- eerror "SECURITY ALERT: pid file is not root owned anymore?! (see #631598)"
- else
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.9103.pid
- fi
- eend $?
-}