home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.suse      Suse is actually not that bad      138,051 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 136,104 of 138,051   
   Bit Twister to Paulo da Silva   
   Re: init script   
   28 Jan 17 06:28:17   
   
   From: BitTwister@mouse-potato.com   
      
   On Sat, 28 Jan 2017 04:03:47 +0000, Paulo da Silva wrote:   
   > Hi all!   
   >   
   > I need to launch a bash script just after mounts and another (or the   
   > same with "stop") before umounts during boot/shutdown process.   
   >   
   > Does anybody know how to do this on OS 42.2?   
   >   
   > A simple template would be nice. I don't want want to go thru the   
   > process of understanding/learning systemd, at least for now.   
      
      
   Well, you will need the basic understanding of systemd services.   
      
   man systemd.service   
      
   Then the name of the service/trigger of interest for   
   Before/After/Wants/Requires....   
      
   I find it handy to see where I want to hook something by running the   
   following two commands:   
      
    systemd-analyze plot > /var/tmp/blame.svg   
    firefox /var/tmp/blame.svg   
      
   And there are plenty working examples to be found over in   
     /lib/systemd/system   
      
   Just for fun try   
     cd /lib/systemd/system   
     grep -iR -- mount *   
     grep -iR -- mount *.service   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca