Mailinglist Archive: opensuse-autoinstall (28 mails)
| < Previous | Next > |
[opensuse-autoinstall] CR: /etc/init.d/autoyast script that allows reboots and runs before xdm
- From: Bernd Nies <listuser@xxxxxxxxxx>
- Date: Wed, 29 Oct 2008 08:57:23 +0100
- Message-id: <49081763.5060909@xxxxxxxxxx>
Hi,
A change request for the /etc/init.d/autoyast script. Benefits:
* Allows an init script to reboot the system (e.g. after an update)
* Runs before display manager is started so that output is visible and
no user logs in while the system is being installed.
The current /etc/init.d/autoyast script in openSUSE 11.0 runs 'chkconfig autoyast off" after the for-loop for executing the init scripts.
==CUT==
#! /bin/sh
### BEGIN INIT INFO
# Provides: autoyast
# Required-Start: $syslog $local_fs
# Should-Start: $remote_fs $network $time ypbind sendmail hwscan
# X-Start-Before: xdm
# Required-Stop:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: A start script to execute autoyast scripts
# Description: Execute autoyast scripts
### END INIT INFO
LOG_DIR="/var/adm/autoinstall/logs"
SCRIPT_DIR="/var/adm/autoinstall/scripts"
INITSCRIPT_DIR="/var/adm/autoinstall/init.d"
if [ ! -d "$INITSCRIPT_DIR" ]; then
exit 1
fi
for script in `find $INITSCRIPT_DIR -type f`; do
CONTINUE=1
done
if [ -z "$CONTINUE" ]; then
chkconfig autoyast off
exit 0
fi
. /etc/rc.status
rc_reset
case "$1" in
start)
# Remember status and be verbose
for script in `find $INITSCRIPT_DIR -type f |sort`; do
echo -n "Executing AutoYaST script: $script"
BASENAME=`basename $script`
sh -x $script 2&> $LOG_DIR/$BASENAME.log
mv -f $script $SCRIPT_DIR
rc_status -v
done
;;
stop)
# Do nothing
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
rc_exit
==CUT==
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
A change request for the /etc/init.d/autoyast script. Benefits:
* Allows an init script to reboot the system (e.g. after an update)
* Runs before display manager is started so that output is visible and
no user logs in while the system is being installed.
The current /etc/init.d/autoyast script in openSUSE 11.0 runs 'chkconfig autoyast off" after the for-loop for executing the init scripts.
==CUT==
#! /bin/sh
### BEGIN INIT INFO
# Provides: autoyast
# Required-Start: $syslog $local_fs
# Should-Start: $remote_fs $network $time ypbind sendmail hwscan
# X-Start-Before: xdm
# Required-Stop:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: A start script to execute autoyast scripts
# Description: Execute autoyast scripts
### END INIT INFO
LOG_DIR="/var/adm/autoinstall/logs"
SCRIPT_DIR="/var/adm/autoinstall/scripts"
INITSCRIPT_DIR="/var/adm/autoinstall/init.d"
if [ ! -d "$INITSCRIPT_DIR" ]; then
exit 1
fi
for script in `find $INITSCRIPT_DIR -type f`; do
CONTINUE=1
done
if [ -z "$CONTINUE" ]; then
chkconfig autoyast off
exit 0
fi
. /etc/rc.status
rc_reset
case "$1" in
start)
# Remember status and be verbose
for script in `find $INITSCRIPT_DIR -type f |sort`; do
echo -n "Executing AutoYaST script: $script"
BASENAME=`basename $script`
sh -x $script 2&> $LOG_DIR/$BASENAME.log
mv -f $script $SCRIPT_DIR
rc_status -v
done
;;
stop)
# Do nothing
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
rc_exit
==CUT==
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |