#!/bin/sh # # telinit jump to next runlevel to start services # # allow time for people to login if they are sat waiting delay=30 PATH=/sbin:/bin:/usr/sbin:/usr/bin exec >/tmp/apb2.log current=`who -r | awk '{print $2}'` next=$(($current+1)) echo "changing to runlevel $next in ${delay}s to start services" (sleep $delay && telinit $next) &