diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:02 +0000 |
commit | 0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch) | |
tree | 2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/patches/fix-nfs-service-name-to-nfs-kernel-server.patch | |
parent | Adding upstream version 2:4.20.0+dfsg. (diff) | |
download | samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.tar.xz samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.zip |
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/fix-nfs-service-name-to-nfs-kernel-server.patch')
-rw-r--r-- | debian/patches/fix-nfs-service-name-to-nfs-kernel-server.patch | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/debian/patches/fix-nfs-service-name-to-nfs-kernel-server.patch b/debian/patches/fix-nfs-service-name-to-nfs-kernel-server.patch new file mode 100644 index 0000000..ad0a9b9 --- /dev/null +++ b/debian/patches/fix-nfs-service-name-to-nfs-kernel-server.patch @@ -0,0 +1,96 @@ +From: Rafael David Tinoco <rafaeldtinoco@gmail.com> +Subject: fix nfs related service names + +Upstream defines nfs related service names based on the Linux +distribution. This patch fixes the names for Debian and derivatives. + +Update by Andreas Hasenack <andreas@canonical.com> (LP: #1961840): +Use nfsconf(8) if it's available, instead of parsing the old config +files in /etc/default/nfs-* + +Bug-Debian: https://bugs.debian.org/929931 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201 +Last-Update: 2022-09-09 +diff --git a/ctdb/config/events/legacy/06.nfs.script b/ctdb/config/events/legacy/06.nfs.script +index b937d433254..943b5005bd9 100755 +--- a/ctdb/config/events/legacy/06.nfs.script ++++ b/ctdb/config/events/legacy/06.nfs.script +@@ -6,7 +6,7 @@ + + . "${CTDB_BASE}/functions" + +-service_name="nfs" ++service_name="nfs-kernel-server" + + load_script_options "service" "60.nfs" + +diff --git a/ctdb/config/events/legacy/60.nfs.script b/ctdb/config/events/legacy/60.nfs.script +index 8e496f73cc5..f47b91bff2d 100755 +--- a/ctdb/config/events/legacy/60.nfs.script ++++ b/ctdb/config/events/legacy/60.nfs.script +@@ -6,9 +6,11 @@ + + . "${CTDB_BASE}/functions" + +-service_name="nfs" ++service_name="nfs-kernel-server" + +-load_system_config "nfs" ++if ! type nfsconf > /dev/null 2>&1; then ++ load_system_config "nfs-kernel-server" ++fi + + load_script_options + +diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout +index f2f3e3824d0..4e3b1e21c04 100755 +--- a/ctdb/config/nfs-linux-kernel-callout ++++ b/ctdb/config/nfs-linux-kernel-callout +@@ -14,7 +14,7 @@ nfs_exports_file="${CTDB_NFS_EXPORTS_FILE:-/var/lib/nfs/etab}" + + # As above, edit the default value below. CTDB_NFS_DISTRO_STYLE is a + # test variable only. +-nfs_distro_style="${CTDB_NFS_DISTRO_STYLE:-systemd-redhat}" ++nfs_distro_style="${CTDB_NFS_DISTRO_STYLE:-systemd-debian}" + + # As above, edit the default value below. CTDB_SYS_ETCDIR is a + # test variable only. +@@ -42,7 +42,22 @@ systemd-*) + : # Defaults only + ;; + *-debian) +- nfs_rquotad_service="quotarpc" ++ # XXX ++ # Undefine nfs_rquotad_services because the quotarpc service won't ++ # start unless there are specific "quota" mount options in /etc/fstab. ++ # In this way, we let ctdb start it up manually once the ++ # /etc/ctdb/nfs-checks.d/50.rquotad.check detects rpc.rquotad isn't ++ # running. ++ # Users who really don't want rpc.rquotad running should then move ++ # the 50.rquotad.check script away. ++ nfs_rquotad_service="" ++ nfs_service="nfs-kernel-server" ++ if type nfsconf >/dev/null 2>&1; then ++ nfs_config="" ++ else ++ nfs_config="/etc/default/nfs-kernel-server" ++ fi ++ nfs_rquotad_config="/etc/default/quota" + ;; + *) + echo "Internal error" +diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout +index 38c155e4793..c138e71c7b1 100755 +--- a/ctdb/config/statd-callout ++++ b/ctdb/config/statd-callout +@@ -29,7 +29,9 @@ die () + } + + # Try different variables to find config file for NFS_HOSTNAME +-load_system_config "nfs" "nfs-common" ++if ! type nfsconf > /dev/null 2>&1; then ++ load_system_config "nfs-common" "nfs-kernel-server" ++fi + + # If NFS_HOSTNAME not set then try to pull it out of /etc/nfs.conf + if [ -z "$NFS_HOSTNAME" ]; then |