#!/bin/sh echo Executing sysshutdown script swapoff -a /usr/local/share/winswapdrv/winswapdrv linux JOBS=$(initctl list | awk '/start\/running.*process/ { if (! /^rc/) print $1 }') echo Stopping remaining upstart jobs $JOBS for j in $JOBS; do initctl stop $j; done if killall5 -15; then sleep 2; sync; killall5 -9; killall5 -9; fi mount -o remount -r /; sleep 5 touch /tmp/rwroot 2>/dev/null && openvt -vfws -c 9 /bin/bash exit 0