diff options
author | jlam <jlam@pkgsrc.org> | 2003-08-30 20:22:49 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-08-30 20:22:49 +0000 |
commit | 2920a32c71bae3a6a02b2c5c0576d9a60b9a0594 (patch) | |
tree | d334e2fd95050def4488e848ea48612e6f9103a4 /comms | |
parent | 2ebf5a7dc8b33d5f29466890b65a69e886f19281 (diff) | |
download | pkgsrc-2920a32c71bae3a6a02b2c5c0576d9a60b9a0594.tar.gz |
Prepare for pkgviews by making sure that passing VIEW-INSTALL or
VIEW-DEINSTALL to the INSTALL/DEINSTALL scripts don't cause errors.
Diffstat (limited to 'comms')
-rw-r--r-- | comms/mgetty+sendfax/DEINSTALL | 17 | ||||
-rwxr-xr-x | comms/mgetty+sendfax/INSTALL | 22 |
2 files changed, 21 insertions, 18 deletions
diff --git a/comms/mgetty+sendfax/DEINSTALL b/comms/mgetty+sendfax/DEINSTALL index 5c99803b1ba..0b86b3699ee 100644 --- a/comms/mgetty+sendfax/DEINSTALL +++ b/comms/mgetty+sendfax/DEINSTALL @@ -1,10 +1,15 @@ #!/bin/sh # +# $NetBSD: DEINSTALL,v 1.4 2003/08/30 20:22:50 jlam Exp $ -if [ -d /var/spool/fax ]; then - filecount="`find /var/spool/fax -type f 2>/dev/null | wc -l`" - if [ $filecount -eq 0 ]; then - echo "Removing empty fax spool directories..." - rm -r /var/spool/fax +case ${STAGE} in +DEINSTALL) + if [ -d /var/spool/fax ]; then + filecount="`${FIND} /var/spool/fax -type f 2>/dev/null | wc -l`" + if [ $filecount -eq 0 ]; then + ${ECHO} "Removing empty fax spool directories..." + ${RM} -r /var/spool/fax + fi fi -fi + ;; +esac diff --git a/comms/mgetty+sendfax/INSTALL b/comms/mgetty+sendfax/INSTALL index 46b7b1387ba..c549a1bbfc1 100755 --- a/comms/mgetty+sendfax/INSTALL +++ b/comms/mgetty+sendfax/INSTALL @@ -1,27 +1,25 @@ #!/bin/sh # +# $NetBSD: INSTALL,v 1.4 2003/08/30 20:22:50 jlam Exp $ -if [ x"$2" = xPOST-INSTALL ] -then - if [ ! -d /var/spool/fax ] - then - echo "Creating fax spool directories..." +case ${STAGE} in +POST-INSTALL) + if [ ! -d /var/spool/fax ]; then + ${ECHO} "Creating fax spool directories..." ${MKDIR} /var/spool/fax ${CHMOD} 755 /var/spool/fax fi - if [ ! -d /var/spool/fax/incoming ] - then + if [ ! -d /var/spool/fax/incoming ]; then ${MKDIR} /var/spool/fax/incoming ${CHMOD} 755 /var/spool/fax/incoming fi - if [ ! -d /var/spool/fax/outgoing ] - then + if [ ! -d /var/spool/fax/outgoing ]; then ${MKDIR} /var/spool/fax/outgoing ${CHMOD} 1777 /var/spool/fax/outgoing fi - if [ ! -d /var/spool/fax/outgoing/locks ] - then + if [ ! -d /var/spool/fax/outgoing/locks ]; then ${MKDIR} /var/spool/fax/outgoing/locks ${CHMOD} 777 /var/spool/fax/outgoing/locks fi -fi + ;; +esac |