summarylogtreecommitdiffstats
path: root/0001-Adjust-RedHat-config-and-service-files.patch
blob: 4377911fe0ea197f578a1b813e7899f73df6832d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From ca0e2a46fe6929ce10b32aa51bb1aa56edae5cf6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20La=C3=9F?= <lass@mail.uni-paderborn.de>
Date: Thu, 19 Feb 2015 19:34:00 +0100
Subject: [PATCH 1/3] Adjust RedHat config and service files

Basically we reuse upstream's config for RedHat but we change a few things:

 * adjust paths to match ArchLinux packaging
 * remove the dynamic creation of CellServDB
 * enable network traffic encryption by default
 * wait for dkms if dkms is used
---
 src/packaging/RedHat/openafs-cacheinfo      |  2 +-
 src/packaging/RedHat/openafs-client.service | 17 ++++++++---------
 src/packaging/RedHat/openafs-server.service |  4 ++--
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/packaging/RedHat/openafs-cacheinfo b/src/packaging/RedHat/openafs-cacheinfo
index dd0fd05..1663c79 100755
--- a/src/packaging/RedHat/openafs-cacheinfo
+++ b/src/packaging/RedHat/openafs-cacheinfo
@@ -1 +1 @@
-/afs:/usr/vice/cache:100000
+/afs:/var/cache/openafs:100000
diff --git a/src/packaging/RedHat/openafs-client.service b/src/packaging/RedHat/openafs-client.service
index 1a34c0c..bcc6de6 100644
--- a/src/packaging/RedHat/openafs-client.service
+++ b/src/packaging/RedHat/openafs-client.service
@@ -1,19 +1,18 @@
 [Unit]
 Description=OpenAFS Client Service
 Wants=network-online.target
-After=syslog.target network-online.target
+After=syslog.target network-online.target dkms.service
 Before=remote-fs.target
 
 [Service]
 Type=forking
-EnvironmentFile=/etc/sysconfig/openafs
-ExecStartPre=/bin/sed -n 'w/usr/vice/etc/CellServDB' /usr/vice/etc/CellServDB.local /usr/vice/etc/CellServDB.dist
-ExecStartPre=/bin/chmod 0644 /usr/vice/etc/CellServDB
-ExecStartPre=/sbin/modprobe openafs
-ExecStart=/usr/vice/etc/afsd $AFSD_ARGS
-ExecStop=/bin/umount /afs
-ExecStop=/usr/vice/etc/afsd -shutdown
-ExecStop=/sbin/rmmod openafs
+EnvironmentFile=/etc/conf.d/openafs
+ExecStartPre=/usr/bin/modprobe openafs
+ExecStart=/usr/bin/afsd $AFSD_ARGS
+ExecStartPost=/usr/bin/fs setcrypt on
+ExecStop=/usr/bin/umount /afs
+ExecStop=/usr/bin/afsd -shutdown
+ExecStop=/usr/bin/rmmod openafs
 KillMode=none
 
 [Install]
diff --git a/src/packaging/RedHat/openafs-server.service b/src/packaging/RedHat/openafs-server.service
index ac9d3c4..0a4b3bf 100644
--- a/src/packaging/RedHat/openafs-server.service
+++ b/src/packaging/RedHat/openafs-server.service
@@ -3,8 +3,8 @@ Description=OpenAFS Server Service
 After=syslog.target network.target
 
 [Service]
-EnvironmentFile=-/etc/sysconfig/openafs
-ExecStart=/usr/afs/bin/bosserver -nofork $BOSSERVER_ARGS
+EnvironmentFile=-/etc/conf.d/openafs
+ExecStart=/usr/bin/bosserver -nofork $BOSSERVER_ARGS
 ExecStop=/usr/bin/bos shutdown localhost -wait -localauth
 
 [Install]
-- 
2.4.4