On Wed, 15 Feb 2006, Richard Hobbs wrote:
Hello,
Is it possible to run an online update using YaST2 from within an init
script?
If so, which command should I use, and how can I specify what types of
packages I want to upgrade (e.g. security, recommended etc...)?
Thanks in advance, people :-)
I've installed fou4s (http://fou4s.gaugusch.at/) and put the following
as /etc/init.d/fou4s:
#! /bin/sh
# Patch script for Math dept., University of Bergen.
# Based on a rc-script from SuSE Linux 8.1
#
# Written by Bjørn Tore Sund
#
### BEGIN INIT INFO
# Provides: fou4s
# Required-Start: $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: Runs fou4s at boot
### END INIT INFO
# Source some useful shell functions
. /etc/rc.status
# Reset status
rc_reset
case "$1" in
start)
echo -n "Starting fou4s: "
fou4s --auto --checkfou4s >> /var/log/fou4satboot
fou4s -in >> /var/log/fou4satboot
rc_status -v
;;
stop)
echo -n "Stopping fou4s: "
rc_status -v
;;
status)
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
rc_exit
-BT
--
Bjørn Tore Sund Phone: (+47) 555-84894 Stupidity is like a
System administrator Fax: (+47) 555-89672 fractal; universal and
Math. Department Mobile: (+47) 918 68075 infinitely repetitive.
University of Bergen VIP: 81724
Support: http://bs.uib.no Contact: teknisk@mi.uib.no Direct: bjornts@mi.uib.no