source: trunk/server/common/patches/openafs-systemd.patch @ 2170

Last change on this file since 2170 was 2165, checked in by ezyang, 13 years ago
Add OpenAFS to the dependencies of remote-fs.
File size: 1.6 KB
RevLine 
[2011]1diff --git a/src/packaging/RedHat/openafs-client.modules b/src/packaging/RedHat/openafs-client.modules
2new file mode 100644
3index 0000000..055d117
4--- /dev/null
5+++ b/src/packaging/RedHat/openafs-client.modules
6@@ -0,0 +1,4 @@
7+#!/bin/sh
8+
9+# Load the OpenAFS kernel module at boot
10+exec /sbin/modprobe openafs
11diff --git a/src/packaging/RedHat/openafs-client.service b/src/packaging/RedHat/openafs-client.service
12new file mode 100644
13index 0000000..bc95057
14--- /dev/null
15+++ b/src/packaging/RedHat/openafs-client.service
16@@ -0,0 +1,18 @@
17+[Unit]
18+Description=OpenAFS Client Service
19+After=syslog.target network.target
20+
21+[Service]
22+Type=forking
23+EnvironmentFile=/etc/sysconfig/openafs
24+ExecStartPre=/bin/sed -n 'w/usr/vice/etc/CellServDB' /usr/vice/etc/CellServDB.local /usr/vice/etc/CellServDB.dist
25+ExecStartPre=/bin/chmod 0644 /usr/vice/etc/CellServDB
26+ExecStartPre=/sbin/modprobe openafs
27+ExecStart=/usr/vice/etc/afsd $AFSD_ARGS
28+ExecStop=/bin/umount /afs
29+ExecStop=/usr/vice/etc/afsd -shutdown
30+ExecStop=/sbin/rmmod openafs
31+KillMode=none
32+
33+[Install]
[2165]34+WantedBy=multi-user.target remote-fs.target
[2011]35diff --git a/src/packaging/RedHat/openafs-server.service b/src/packaging/RedHat/openafs-server.service
36new file mode 100644
37index 0000000..2d34bb0
38--- /dev/null
39+++ b/src/packaging/RedHat/openafs-server.service
40@@ -0,0 +1,11 @@
41+[Unit]
42+Description=OpenAFS Server Service
43+After=syslog.target network.target
44+
45+[Service]
46+EnvironmentFile=-/etc/sysconfig/openafs
47+ExecStart=/usr/afs/bin/bosserver $BOSSERVER_ARGS
48+ExecStop=/usr/bin/bos shutdown localhost -wait -localauth
49+
50+[Install]
51+WantedBy=multi-user.target
Note: See TracBrowser for help on using the repository browser.