Use service foo rather than calling init scripts directly
authorTollef Fog Heen <tfheen@err.no>
Thu, 9 May 2013 08:19:58 +0000 (10:19 +0200)
committerTollef Fog Heen <tfheen@err.no>
Thu, 9 May 2013 08:19:58 +0000 (10:19 +0200)
input/howto/export-iscsi.creole
input/howto/install-ganeti.creole
input/howto/iscsi.creole
input/howto/new-machine.creole
input/howto/puppet-setup.mdwn

index ce89ce8..6d3b88f 100644 (file)
@@ -23,7 +23,7 @@ This document describes how to add new new volumes on gustini and add them into
     iscsiadm -m node --targetname "iqn.1986-03.com.hp:storage.msa2012i.0834d5ecda.a" --rescan
 
   + on dijkstra: add aliases to the wwids (show topology)
-  + on dijkstra: /etc/init.d/multipath-tools reload
+  + on dijkstra: service multipath-tools reload
 }}}
 
 == via telnet interface ==
index bd2a3be..5f9734f 100644 (file)
@@ -366,7 +366,7 @@ And you want to convert it to use DRBD afterwards and start it on the other clus
   
   then:
   reload multipath-tools on gnt-master (normaly bm-bl1):
-  /etc/init.d/multipath-tools reload
+  service multipath-tools reload
   add the WWNs to dsa-puppet/modules/multipath/files/bm-multipath.conf and define the alias and commit that file to git.
 
   then:
index 83e8eef..78acd25 100644 (file)
@@ -72,9 +72,9 @@ corresponding to the two addresses that controller A has:
 
 * stop and start iscsi:
 {{{
-       /etc/init.d/open-iscsi stop &&
+       service open-iscsi stop &&
        sleep 3 &&
-       (cd / && env -i /etc/init.d/open-iscsi start)
+       service open-iscsi start)
 }}}
 
 * not sure if this is necessary again:
@@ -183,7 +183,7 @@ apt-get install multipath-tools
 * for the wwid thing in there create an entry in multipath.conf with a proper name, then reload multipathd
 {{{
        vi /etc/multipath.conf
-       /etc/init.d/multipath-tools reload
+       service multipath-tools reload
        echo show topology | multipathd -k
        ls -l /dev/mapper
 }}}
index d8e6c65..054ef19 100644 (file)
@@ -48,7 +48,7 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
               s/^group:\[[:space:]]\+compat$/group:          db compat/;
               s/^shadow:\[[:space:]]\+compat$/shadow:         compat db/' \
         /etc/nsswitch.conf
-    (cd / && env -i /etc/init.d/ssh restart)
+    (service ssh restart)
 }}}
 
 * on the host, run ud-replicate
index 9487503..aad6e4e 100644 (file)
@@ -14,7 +14,7 @@ adjusted.
 
         : ::client:: && me=$(hostname -f) && [ "$me" != "${me%debian.org}" ] && apt-get update &&
                 apt-get install -y --no-install-recommends puppet libaugeas-ruby1.8 augeas-lenses lsb-release &&
-                /etc/init.d/puppet stop &&
+                service puppet stop &&
                 (puppet agent -t || true ) &&
                 cd /var/lib/puppet/ssl/certificate_requests &&
                 echo sha256sum output: && echo &&