add yum-updatesd config files
authorJeremy Katz <katzj@redhat.com>
Wed, 18 Jul 2007 03:35:00 +0000 (23:35 -0400)
committerJeremy Katz <katzj@redhat.com>
Wed, 18 Jul 2007 03:35:00 +0000 (23:35 -0400)
etc/yum-updatesd-dbus.conf [new file with mode: 0644]
etc/yum-updatesd.conf [new file with mode: 0644]
etc/yum-updatesd.init [new file with mode: 0755]

diff --git a/etc/yum-updatesd-dbus.conf b/etc/yum-updatesd-dbus.conf
new file mode 100644 (file)
index 0000000..734a69d
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+       <policy user="root">
+               <allow own="edu.duke.linux.yum"/>
+               <allow send_destination="edu.duke.linux.yum"/>
+                <allow send_interface="edu.duke.linux.yum"/>
+       </policy>
+       <policy at_console="true">
+               <allow own="edu.duke.linux.yum"/>
+
+               <allow send_destination="edu.duke.linux.yum"/>
+                <allow send_interface="edu.duke.linux.yum"/>
+       </policy>
+       <policy context="default">
+               <deny own="edu.duke.linux.yum"/>
+
+               <deny send_destination="edu.duke.linux.yum"/>
+               <deny send_interface="edu.duke.linux.yum"/>
+       </policy>
+</busconfig>
+
diff --git a/etc/yum-updatesd.conf b/etc/yum-updatesd.conf
new file mode 100644 (file)
index 0000000..9af82ee
--- /dev/null
@@ -0,0 +1,18 @@
+[main]
+# how often to check for new updates (in seconds)
+run_interval = 3600
+# how often to allow checking on request (in seconds)
+updaterefresh = 600
+
+# how to send notifications (valid: dbus, email, syslog)
+emit_via = dbus
+# should we listen via dbus to give out update information/check for
+# new updates 
+dbus_listener = yes
+
+# automatically install updates
+do_update = no
+# automatically download updates
+do_download = no
+# automatically download deps of updates
+do_download_deps = no
diff --git a/etc/yum-updatesd.init b/etc/yum-updatesd.init
new file mode 100755 (executable)
index 0000000..55f166d
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/bash
+#
+# yum           This shell script enables the yum-updates daemon
+#
+# Author:       Jeremy Katz <katzj@redhat.com>
+#
+# chkconfig:   345 97 03
+#
+# description:  This is a daemon which periodically checks for updates \
+#               and can send notifications via mail, dbus or syslog.
+# processname:  yum-updatesd
+# config: /etc/yum/yum-updatesd.conf
+# pidfile: /var/run/yum-updatesd.pid
+#
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+start() {
+       echo -n $"Starting yum-updatesd: "
+       daemon +19 yum-updatesd
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/yum-updatesd
+}
+
+stop() {
+       echo -n $"Stopping yum-updatesd: "
+       killproc yum-updatesd
+       echo
+       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/yum-updatesd
+}
+
+restart() {
+       stop
+       start
+}
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop) 
+       stop
+       ;;
+  restart|force-reload|reload)
+       restart
+       ;;
+  condrestart)
+       [ -f /var/lock/subsys/yum-updatesd ] && restart
+       ;;
+  status)
+       status yum-updatesd
+       RETVAL=$?
+       ;;
+  *)
+       echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
+       exit 1
+esac
+
+exit $RETVAL