]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
systemd compatibility: use service(8)
authorBenjamin Kaduk <kaduk@mit.edu>
Mon, 10 Jul 2017 15:19:58 +0000 (10:19 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 10 Jul 2017 19:40:38 +0000 (14:40 -0500)
We documented (and used!) /etc/init.d/openafs-* directly in a few
places, including afs-newcell.  This is not the right thing to
do in a systemd world, so use a portable scheme instead.

service(8) is provided by init-system-helpers, which is essential.

Change-Id: I1a94216732d1e4700a1536d5343071833b4b7076

debian/README.servers
debian/afs-newcell
debian/afs.conf
debian/changelog
debian/configuration-transcript.txt
debian/openafs-client.templates

index 00e9ce938b21c3c0637af4c535c4511cabdd5d69..32b36f64379d5025a5cb223e7fee92740cc0999d 100644 (file)
@@ -121,7 +121,7 @@ Creating a New Cell
       If you have already installed openafs-client and configured it for
       some other cell, you do need to configure it to point to your new
       cell for these instructions to work.  Stop the AFS client on the
-      system with /etc/init.d/openafs-client stop and then run:
+      system with service openafs-client stop and then run:
 
            dpkg-reconfigure openafs-client
 
index 456433fd002255e64fd6e2090258445c5bb413d7..87e05860fb19feb8c2d33507c8b318d3cee632df 100755 (executable)
@@ -104,7 +104,7 @@ while(<MOUNT>) {
     if (m:^AFS:) {
         print "The AFS client is currently running on this workstation.\n";
         print "Please restart this script after running"
-            . " /etc/init.d/openafs-client stop\n";
+            . " service openafs-client stop\n";
         exit(1);
     }
 }
@@ -119,7 +119,7 @@ unless ( -f "/etc/openafs/server/KeyFile") {
 
 # Stop the file server.
 print "If the fileserver is not running, this may hang for 30 seconds.\n";
-run("/etc/init.d/openafs-fileserver stop");
+run("service openafs-fileserver stop");
 
 # Get the local hostname.  Use the fully-qualified hostname to be safer.
 $server = `hostname -f`;
@@ -194,7 +194,7 @@ print CELLSERVDB inet_ntoa($ip), "\t\t\t#$server\n";
 close CELLSERVDB or die "Cannot write to /etc/openafs/server/CellServDB: $!\n";
 
 # Now, we should be able to start bos and add the admin user.
-run("/etc/init.d/openafs-fileserver start");
+run("service openafs-fileserver start");
 $shutdown_needed = 1;
 run("bos adduser $server $afs_admin -localauth");
 unwind("bos removeuser $server $afs_admin -localauth");
@@ -256,7 +256,7 @@ open(THIS, "> /etc/openafs/ThisCell")
     or die "ERROR: Cannot create /etc/openafs/ThisCell: $!\n";
 print THIS "$cell\n";
 close THIS or die "ERROR: Cannot write to /etc/openafs/ThisCell: $!\n";
-run("/etc/init.d/openafs-client force-start");
+run("service openafs-client force-start");
 
 # Verify that AFS has managed to start.
 my $afs_running = 0;
index f3eeb76f3b54dd82d9b65d18be727a02915bf981..701d50f497a3e833157269e2d5ac8934125c2820 100644 (file)
@@ -107,7 +107,7 @@ AFS_PRE_SHUTDOWN=
 # with open AFS files to be killed before unmounting AFS if the runlevel being
 # switched to is 0 or 6.
 #
-# Warning: This means /etc/init.d/openafs-client stop will kill all processes
+# Warning: This means service openafs-client stop will kill all processes
 # with files open in AFS rather than returning an error saying the file system
 # is busy.  This is probably what you want when the whole system is shutting
 # down, but often *not* what you want when just stopping and restarting the
index e2b6b48ac249acb5fc74b7e53803a5f50ef10b85..eef1f6d7f17b7d9c2920c3aa5fa5f24d5c1bb8f7 100644 (file)
@@ -17,6 +17,8 @@ openafs (1.6.21-1) UNRELEASED; urgency=medium
   * Switch openafs-fileserver.service to Type=simple and pass -nofork to
     bosserver.  (Closes: #865962)
   * Update for policy version 4.0.0, honor nodoc in DEB_BUILD_OPTIONS
+  * Use service(8) instead of /etc/init.d/* directly in documentation and
+    helper scripts
 
  -- Benjamin Kaduk <kaduk@mit.edu>  Thu, 06 Jul 2017 09:19:27 -0500
 
index 57cc3ba168d89c4acb81bdfe006a5b3d3bf1034a..1acaeb61de2182cad5b56988a025a39794a78f2a 100644 (file)
@@ -207,7 +207,7 @@ Should the Openafs filesystem be started and mounted at boot?
 Normally, most users who install the openafs-client package expect to
 run it at boot.  However, if you are planning on setting up a new cell
 or are on a laptop, you may not want it started at boot time. If you
-choose not to start AFS at boot , run /etc/init.d/openafs-client
+choose not to start AFS at boot , run service openafs-client
 force-start to start the client when you wish to run it.
 
 Run Openafs client now and at boot? no
@@ -303,13 +303,13 @@ In order to set up a new AFS cell, you must meet the following:
 
 Do you meet these requirements? [y/n] y
 If the fileserver is not running, this may hang for 30 seconds.
-/etc/init.d/openafs-fileserver stop
+service openafs-fileserver stop
 Stopping AFS Server: bos: could not find entry (can't find cell '<default>' in cell database)
 bosserver.
 What administrative principal should be used? faheem/admin
 
 /etc/openafs/server/CellServDB already exists, renaming to .old
-/etc/init.d/openafs-fileserver start
+service openafs-fileserver start
 Starting AFS Server: bosserver.
 bos adduser riverside.dulci.biostat.duke.edu faheem.admin -localauth
 pt_util: /var/lib/openafs/db/prdb.DB0: Bad UBIK_MAGIC. Is 0 should be 354545
@@ -323,7 +323,7 @@ bos create riverside.dulci.biostat.duke.edu fs fs -cmd /usr/lib/openafs/fileserv
 Waiting for database elections: done.
 vos create riverside.dulci.biostat.duke.edu a root.afs -localauth
 Volume 536870912 created on partition /vicepa of riverside.dulci.biostat.duke.edu
-/etc/init.d/openafs-client force-start
+service openafs-client force-start
 Starting AFS services: afsd: All AFS daemons started.
   afsd.
 
index 3002840c0963dcff6a2805cfe39cb0923e4200ab..6df69f6dbc367399a3b646d2c193ea8bfa8a396b 100644 (file)
@@ -36,7 +36,7 @@ _Description: Run Openafs client now and at boot?
  be mounted automatically at boot.  However, if you are planning on
  setting up a new cell or are on a laptop, you may not want it started at
  boot time.  If you choose not to start AFS at boot, run
/etc/init.d/openafs-client force-start to start the client when you wish
service openafs-client force-start to start the client when you wish
  to run it.
 
 Template: openafs-client/afsdb