home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
chilidog.highland.cc.ks.us
/
chilidog.highland.cc.ks.us.zip
/
chilidog.highland.cc.ks.us
/
backup
/
bradford.20120521.etc.tar.gz
/
bradford.20120521.etc.tar
/
etc
/
init.d
/
boot.scpm
< prev
next >
Wrap
Text File
|
2006-05-02
|
2KB
|
69 lines
#!/bin/sh
#
# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.
# 2005 SUSE Linux Products GmbH
#
# Author: Joachim Gleissner <jg@suse.de>
#
# /etc/init.d/boot.scpm
#
# $Id: boot.scpm,v 1.3 2005/12/13 16:30:15 gleissner Exp $
#
### BEGIN INIT INFO
# Provides: boot.scpm
# Required-Start: boot.localfs
# X-UnitedLinux-ShouldStart: boot.md boot.lvm
# Required-Stop:
# Default-Start: B
# Default-Stop:
# Description: Set up on-boot profile
### END INIT INFO
. /etc/rc.status
SCPM=/usr/sbin/scpm
SCPM_CONF=/etc/sysconfig/scpm
test -x $SCPM || exit 0
test -f $SCPM_CONF || exit 0
. $SCPM_CONF
rc_reset
case "$1" in
start|b)
test -z "$PROFILE" && exit 0
test $($SCPM status | awk '{ if ($1 == "enabled") print $3 }') = no \
&& { echo "Can not restore profile $PROFILE, SCPM is disabled" ;
exit 0; }
test "$PROFILE" = "`$SCPM active`" && exit 0
test -z "$BOOT_MODE" && BOOT_MODE=force
echo -n "Restoring profile $PROFILE"
if [ "$BOOT_MODE" = "force" ]; then
$SCPM -b -q -f switch $PROFILE || rc_failed
elif [ "$BOOT_MODE" = "skip" ]; then
$SCPM -b -q -s switch $PROFILE || rc_failed
elif [ "$BOOT_MODE" = "backup" ]; then
$SCPM -q delete _boot 2>/dev/null
$SCPM -q add _boot
$SCPM -b -q -s switch $PROFILE || rc_failed
else
echo -n " unkown boot mode $BOOT_MODE"
rc_failed
fi
rc_status -v
;;
stop)
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
rc_exit