diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-06-13 05:43:00 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-06-13 09:44:21 +0200 |
commit | d8095c1e90c817c5c1bd4cbb892be7218946279b (patch) | |
tree | 031d60b6fcf278de9783be42a3a77d253a03a1ea /source/ap | |
parent | 2c20c6847e0caa3b62f6e5a0506790393c141932 (diff) | |
download | current-d8095c1e90c817c5c1bd4cbb892be7218946279b.tar.gz |
Wed Jun 13 05:43:00 UTC 201820180613054300
a/dcron-4.5-x86_64-7.txz: Rebuilt.
Added init script and defaults file.
Moved TMPDIR to /run/cron.
Thanks to Robby Workman and shasta.
a/efibootmgr-16-x86_64-1.txz: Upgraded.
a/efivar-36-x86_64-1.txz: Added.
a/elilo-3.16-x86_64-7.txz: Rebuilt.
a/glibc-solibs-2.27-x86_64-4.txz: Rebuilt.
Don't restart init in the install script, let rc.6 handle it.
a/haveged-1.9.2-x86_64-1.txz: Added.
a/pkgtools-15.0-noarch-18.txz: Rebuilt.
setup.services: add support for rc.atd and rc.crond
a/sysvinit-scripts-2.1-noarch-10.txz: Rebuilt.
rc.6: restart init when shutting down - this prevents it from holding file
handles to removed/upgraded versions of the glibc shared libraries which
would interfere with shutdown.
rc.K: use full path to telinit
rc.M: start rc.atd and rc.crond
rc.M: don't remove cron tempfiles (moved to /run/cron)
rc.S: start rc.haveged
ap/at-3.1.20-x86_64-3.txz: Rebuilt.
Added init script and defaults file.
l/glibc-2.27-x86_64-4.txz: Rebuilt.
Don't restart init in the install script, let rc.6 handle it.
l/glibc-i18n-2.27-x86_64-4.txz: Rebuilt.
l/glibc-profile-2.27-x86_64-4.txz: Rebuilt.
l/gnu-efi-3.0.8-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/ap')
-rwxr-xr-x | source/ap/at/at.SlackBuild | 15 | ||||
-rw-r--r-- | source/ap/at/atd.default | 6 | ||||
-rw-r--r-- | source/ap/at/doinst.sh | 33 | ||||
-rw-r--r-- | source/ap/at/rc.atd | 39 | ||||
-rw-r--r-- | source/ap/at/slack-desc | 2 |
5 files changed, 84 insertions, 11 deletions
diff --git a/source/ap/at/at.SlackBuild b/source/ap/at/at.SlackBuild index 46837914..6d8af558 100755 --- a/source/ap/at/at.SlackBuild +++ b/source/ap/at/at.SlackBuild @@ -23,8 +23,8 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=at -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -62,7 +62,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf at-$VERSION -tar xvf $CWD/at-${VERSION}.tar.?z* || exit 1 +tar xvf $CWD/at-${VERSION}.tar.?z || exit 1 cd at-$VERSION || exit 1 chown -R root:root . @@ -89,6 +89,15 @@ make install IROOT=$PKG || exit mv $PKG/etc/at.deny $PKG/etc/at.deny.new chown root:root $PKG/var $PKG/var/spool +# Add the init script: +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.atd > $PKG/etc/rc.d/rc.atd.new +chmod 755 $PKG/etc/rc.d/rc.atd.new + +# Add the default file: +mkdir -p $PKG/etc/default +cat $CWD/atd.default > $PKG/etc/default/atd.new + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null diff --git a/source/ap/at/atd.default b/source/ap/at/atd.default new file mode 100644 index 00000000..b70fad0b --- /dev/null +++ b/source/ap/at/atd.default @@ -0,0 +1,6 @@ +# Default options for the atd daemon: +# +# -b 15: minimal interval in seconds between two jobs +# -l 1: do not start new jobs if the load average is above 1 + +ATD_OPTS="-b 15 -l 1" diff --git a/source/ap/at/doinst.sh b/source/ap/at/doinst.sh index 6c4b5431..8c031101 100644 --- a/source/ap/at/doinst.sh +++ b/source/ap/at/doinst.sh @@ -1,16 +1,35 @@ #!/bin/sh + config() { + for infile in $1; do + NEW="$infile" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... + done +} + +preserve_perms() { NEW="$1" - OLD="`dirname $NEW`/`basename $NEW .new`" - # If there's no config file by that name, mv it over: - if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy - rm $NEW + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW fi - # Otherwise, we leave the .new copy for the admin to consider... + config $NEW } + +preserve_perms etc/rc.d/rc.atd.new +config etc/default/atd.new config etc/at.deny.new + if [ ! -r var/spool/atjobs/.SEQ ]; then touch var/spool/atjobs/.SEQ chmod 660 var/spool/atjobs/.SEQ diff --git a/source/ap/at/rc.atd b/source/ap/at/rc.atd new file mode 100644 index 00000000..2e06f169 --- /dev/null +++ b/source/ap/at/rc.atd @@ -0,0 +1,39 @@ +#!/bin/sh +# /etc/rc.d/rc.atd - start/stop the at daemon + +# To change the default options, edit /etc/default/atd. +if [ -r /etc/default/atd ]; then + . /etc/default/atd +fi + +start_atd() { + if ! /usr/bin/pgrep --ns $$ --exact atd 1> /dev/null 2> /dev/null ; then + echo "Starting atd: /usr/sbin/atd $ATD_OPTS" + /usr/sbin/atd $CROND_OPTS + fi +} + +stop_atd() { + echo "Stopping atd." + /usr/bin/pkill --ns $$ --exact atd 2> /dev/null +} + +restart_atd() { + stop_atd + sleep 1 + start_atd +} + +case "$1" in +'start') + start_atd + ;; +'stop') + stop_atd + ;; +'restart') + restart_atd + ;; +*) + echo "usage $0 start|stop|restart" +esac diff --git a/source/ap/at/slack-desc b/source/ap/at/slack-desc index cc37d8b8..532193fb 100644 --- a/source/ap/at/slack-desc +++ b/source/ap/at/slack-desc @@ -14,6 +14,6 @@ at: time. at: at: The 'at' command was written by David Parsons and Thomas Koenig. at: -at: Homepage: http://anonscm.debian.org/cgit/collab-maint/at.git/ +at: Homepage: http://ftp.debian.org/debian/pool/main/a/at at: at: |