[Tickets] [Initng] #814: swap.i should exit 0 on failure

Initng trac at initng.org
Mon Mar 31 06:18:49 CEST 2008


#814: swap.i should exit 0 on failure
-----------------------------------+----------------------------------------
 Reporter:  rick_777               |       Owner:              
     Type:  i don't know           |      Status:  new         
 Priority:  normal                 |   Milestone:              
Component:  Bugs in initng-ifiles  |     Version:  initng-0.6.7
 Severity:  normal                 |    Keywords:              
-----------------------------------+----------------------------------------
 If for some reason I screw up (oops) my swap partition, the system/swap
 service fails, but due to the dependency pyramid, all the terminals and
 necessary processes fail, too! That's not what we want, since one can
 effectively run linux without the swap.

 Here's the fixed script (if there's a more elegant way to fail but still
 ignore the dependency, i'd love to know).

 service system/swap {
         need = system/initial system/mountfs/essential;
         script start = {
           /sbin/swapon -a
           exit 0 # Bad things happen if we fail
         };

         script stop = {
           /sbin/swapoff -a
           exit 0
         };
 }

-- 
Ticket URL: </ticket/814>
Initng <>
The next generation init system


More information about the Tickets mailing list