Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # /etc/rc.local.shutdown: Local shutdown script.
  4. #
  5. . /etc/rc.conf
  6. . /etc/rc.d/functions
  7.  
  8. RUNLEVEL=`runlevel`
  9. FBMODULE="uvesafb"
  10.  
  11. if [ -e "/var/run/daemons/kexec" -a "${RUNLEVEL:2:2}" = "6" ]; then
  12.  
  13.   stat_busy "Stopping framebuffer"
  14.   if [ -e "/sys/class/vtconsole/vtcon1/bind" ]; then
  15.     echo 0 > /sys/class/vtconsole/vtcon1/bind
  16.     VTCONBIND=`cat /sys/class/vtconsole/vtcon1/bind`
  17.     if [ $VTCONBIND = "0" ]; then
  18.       stat_done
  19.     else
  20.       stat_fail
  21.     fi
  22.   else
  23.     stat_done
  24.   fi
  25.  
  26.  
  27.   lsmod | grep $FBMODULE >& /dev/null
  28.   if [ $? -eq 0 ]; then
  29.     rmmod $FBMODULE >& /dev/null
  30.     if [ $? -ne 0 ]; then
  31.       rmmod -f $FBMODULE
  32.     fi
  33.   fi
  34. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement