- Replace DEINSTALL with UNMESSAGE

- Replace INSTALL with MESSAGE and @sample
- Update @extra
- Bump PKGNAME

ok naddy@
This commit is contained in:
alek 2004-11-26 17:14:49 +00:00
parent f9123fc18d
commit 54da414715
6 changed files with 38 additions and 151 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.3 2004/05/17 00:22:54 naddy Exp $
# $OpenBSD: Makefile,v 1.4 2004/11/26 17:14:49 alek Exp $
COMMENT= "periodic command scheduler"
DISTNAME= anacron-2.3
PKGNAME= ${DISTNAME}p0
CATEGORIES= sysutils
HOMEPAGE= http://sourceforge.net/projects/anacron/

View File

@ -1,70 +0,0 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1.1.1 2003/08/23 19:24:50 sturm Exp $
#
# De-installation setup of anacron
PATH=/bin:/usr/bin:/sbin:/usr/sbin
SPOOL_DIR=/var/spool/anacron
# Function: remove the anacron spool dir
do_spooldir()
{
if [ "$PKG_DELETE_EXTRA" != Yes -a -d $SPOOL_DIR ]; then
cat <<EOT
+----------
| Delete the $SPOOL_DIR spool directory manually for a full
| deinstallation. To do this, execute
|
| rm -rf $SPOOL_DIR
|
| as root.
+----------
EOT
fi
}
# Function: remove configurations
do_configs()
{
if [ "$PKG_DELETE_EXTRA" != Yes -a -f ${SYSCONFDIR}/anacrontab ]; then
cat <<EOT
+----------
| The existing ${SYSCONFDIR}/anacrontab has not been deleted. To
| delete this file, execute
|
| rm ${SYSCONFDIR}/anacrontab
|
| as root.
+----------
EOT
fi
}
do_notice()
{
cat <<EOT
+----------
| Remember to restore any changes you made to root's crontab
| when installing anacron.
+----------
EOT
}
# Verify/process the command
#
case $2 in
DEINSTALL)
do_spooldir
do_configs
do_notice
;;
*)
echo "Usage: `basename $0` distname DEINSTALL" >&2
exit 1
;;
esac
exit 0

View File

@ -1,77 +0,0 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.2 2004/05/17 00:22:54 naddy Exp $
#
# Pre/post-installation setup of anacron
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
SPOOL_DIR=/var/spool/anacron
# Function: set up the anacron spool dir
do_spooldir()
{
echo "-> Creating anacron spooldir under $SPOOL_DIR"
if [ ! -d $SPOOL_DIR ]; then
install -d -o root -g wheel -m 755 $SPOOL_DIR
fi
}
# Function: tell the user what s/he needs to do to use the port
# just installed
#
do_notice()
{
cat <<EOT
+----------
| To start using anacron:
|
| Create the file ${SYSCONFDIR}/anacrontab (see anacrontab(5) for
| information about its format).
|
| The following is a simple example which runs the standard
| OpenBSD daily, weekly, and monthly scripts:
|
| -----Cut
| # ${SYSCONFDIR}/anacrontab example
| SHELL=/bin/sh
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
| # format: period delay job-identifier command
| 1 5 cron.daily sh /etc/daily 2>&1 | tee /var/log/daily.out
| 7 10 cron.weekly sh /etc/weekly 2>&1 | tee /var/log/weekly.out
| 30 15 cron.monthly sh /etc/monthly 2>&1 | tee /var/log/monthly.out
| -----Cut
|
| Comment out the invocation of these jobs in root's crontab.
|
| Invoke anacron from /etc/rc.local like this:
|
| if [ X"\${anacron}" == X"YES" -a -x ${PREFIX}/sbin/anacron ]; then
| echo -n ' anacron'
| ${PREFIX}/sbin/anacron -s
| fi
|
| (and add "anacron=YES" to /etc/rc.conf.local)
|
| If your machine is left running for more than 24h at a time, you
| might also want to invoke anacron from an early morning cron job.
+----------
EOT
}
# Verify/process the command
#
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
do_spooldir
do_notice
;;
*)
echo "Usage: `basename $0` distname <PRE-INSTALL|POST-INSTALL>" >&2
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,31 @@
To start using anacron:
Create the file ${SYSCONFDIR}/anacrontab (see anacrontab(5) for
information about its format).
The following is a simple example which runs the standard
OpenBSD daily, weekly, and monthly scripts:
-----Cut
# ${SYSCONFDIR}/anacrontab example
SHELL=/bin/sh
PATH=${PREFIX}/sbin:${PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin
# format: period delay job-identifier command
1 5 cron.daily sh /etc/daily 2>&1 | tee /var/log/daily.out
7 10 cron.weekly sh /etc/weekly 2>&1 | tee /var/log/weekly.out
30 15 cron.monthly sh /etc/monthly 2>&1 | tee /var/log/monthly.out
-----Cut
Comment out the invocation of these jobs in root's crontab.
Invoke anacron from /etc/rc.local like this:
if [ X"\${anacron}" == X"YES" -a -x ${PREFIX}/sbin/anacron ]; then
echo -n ' anacron'
${PREFIX}/sbin/anacron -s
fi
(and add "anacron=YES" to /etc/rc.conf.local)
If your machine is left running for more than 24h at a time, you
might also want to invoke anacron from an early morning cron job.

View File

@ -1,10 +1,10 @@
@comment $OpenBSD: PLIST,v 1.3 2004/10/07 05:20:18 sturm Exp $
@comment $OpenBSD: PLIST,v 1.4 2004/11/26 17:14:49 alek Exp $
@man man/man5/anacrontab.5
@man man/man8/anacron.8
sbin/anacron
@comment var/
@comment var/spool/
@comment var/spool/anacron/
@sample /var/spool/anacron/
@extra ${SYSCONFDIR}/anacrontab
@extraunexec rm -fr /var/spool/anacron
@cwd ${SYSCONFDIR}
@extra anacrontab

View File

@ -0,0 +1,2 @@
Remember to restore any changes you made to root's crontab
when installing anacron.