Differences

This shows you the differences between two versions of the page.

Link to this comparison view

desktop:custom_runlevels_script [2017/02/05 22:43] (current)
Line 1: Line 1:
 +=====Custom Init Runlevels script=====
 +This is the file in ~/bin/init to replace the standard init script. ​ It will only work if your home/bin directory is before /sbin in the path.
 +
 +<​code>​
 +  #!/bin/bash
 +  if [ "​$1"​ -eq 7 ] ; then
 +         sudo acpitool -s;
 +  else
 +         if [ "​$1"​ -eq 8 ] ; then
 +                 sudo acpitool -S;
 +         else
 +                 sudo /sbin/init "​$1";​
 +         fi
 +  fi
 +</​code>​
 +
 +It is setup such that the standard runlevels (0-6) are passed straight back to the /sbin/init script while level 7 is suspend-to-ram and runs
 +  acpitool -s
 +And runlevel 8 runs suspend-to-hdd
 +  acpitool -S
  
desktop/custom_runlevels_script.txt ยท Last modified: 2017/02/05 22:43 (external edit)
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0