2 if grep svscanboot /etc/inittab >/dev/null
4 echo 'inittab contains an svscanboot line. I assume that svscan is already running.'
6 echo 'Adding svscanboot to inittab...'
7 rm -f /etc/inittab'{new}'
8 cat /etc/inittab > /etc/inittab'{new}'
9 echo "sv:123456:respawn:/usr/sbin/svscanboot" >> /etc/inittab'{new}'
10 mv -f /etc/inittab'{new}' /etc/inittab || exit 1
12 echo 'init should start svscan now.'
17 if grep svscanboot /etc/inittab >/dev/null
19 echo 'Removing svscanboot from inittab...'
20 rm -f /etc/inittab'{old}'
21 sed -e '/^sv:/d' /etc/inittab > /etc/inittab'{old}' || exit 1
22 mv -f /etc/inittab'{old}' /etc/inittab || exit 1
24 echo 'init should stop svscan now.'