Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
qmail-vacation
qmail-vacation-config.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qmail-vacation-config.patch of Package qmail-vacation
diff -rU3 qmail-vacation-v1.4m.orig/install.sh qmail-vacation-v1.4m/install.sh --- qmail-vacation-v1.4m.orig/install.sh 2003-07-01 00:07:17.000000000 +0200 +++ qmail-vacation-v1.4m/install.sh 2011-04-27 15:04:22.000000000 +0200 @@ -1,35 +1,58 @@ #!/bin/bash -BINDIR="/usr/local/bin"; -MANDIR="/usr/man/man1"; +if [ $# -gt 0 ]; then + cat <<__EOT__ >&2 +Usage: $0 +The following environment variables will be used if present: +DESTDIR (default: emtpy) +BINDIR (default: /usr/local/bin) +MANDIR (default: /usr/local/man) +ALIASES (default: .vacation.aliases) +DBMFILE (default: .vacation) +DOTQMAIL (default: .qmail) +EDITOR (default: `which vi`) +MBOX (default: \$home/Mailbox) +MAILPROG (default: /var/qmail/bin/qmail-inject) +MSGFILE (default: .vacation.msg) +NOREPLY (default: .vacation.noreply) +PAGER (default: `which more`) +PERL (default: `which perl`) +__EOT__ + exit 1 +fi SCRIPTFILE="./vacation"; MANFILE="./vacation.1" +install() { + sed "s#xVERSIONx#v1.4m#g;s#xVACATIONx#$BINDIR/vacation#g;s#xALIASESx#${ALIASES:-.vacation.aliases}#g;s#xDBMFILEx#${DBMFILE:-.vacation}#g;s#xDOTQMAILx#${DOTQMAIL:-.qmail}#g;s#xEDITORx#${EDITOR:-`which vi`}#g;s#xMBOXx#${MBOX:-\$home/Mailbox}#g;s#xMAILPROGx#${MAILPROG:-/var/qmail/bin/qmail-inject}#g;s#xMSGFILEx#${MSGFILE:-.vacation.msg}#g;s#xNOREPLYx#${NOREPLY:-.vacation.noreply}#g;s#xPAGERx#${PAGER:-`which more`}#g;s#xPERLx#${PERL:-`which perl`}#g;" <"$1" >"$2/${1##*/}" + chmod "$3" "$2/${1##*/}" +} + echo "Installing vacation ..."; -if [ -r $SCRIPTFILE ] && [ -r $MANFILE ]; then +if [ -r "$SCRIPTFILE" ] && [ -r "$MANFILE" ]; then - #Check to make sure BINDIR and CONFDIR exist. - if [ ! -d $BINDIR ]; then - echo -n " Creating $BINDIR ... "; - mkdir -p $BINDIR; + #Check to make sure BINDIR and MANDIR exist. + if [ ! -d "$DESTDIR${BINDIR:=/usr/local/bin}" ]; then + echo -n " Creating "$DESTDIR$BINDIR" ... "; + mkdir -p "$DESTDIR$BINDIR"; echo "done." fi - if [ ! -d $MANDIR ]; then - echo -n " Creating $MANDIR ... "; - mkdir -p $MANDIR; + if [ ! -d "$DESTDIR${MANDIR:=/usr/local/man}/man1" ]; then + echo -n " Creating "$DESTDIR$MANDIR" ... "; + mkdir -p "$DESTDIR$MANDIR/man1"; echo "done." fi - #Copy SCRIPTFILE and UPDATEFILE to BINDIR + #Copy SCRIPTFILE to BINDIR echo -n " Copying scripts into place ... "; - cp $SCRIPTFILE $BINDIR + install "$SCRIPTFILE" "$DESTDIR$BINDIR" 0755 echo "done."; - #Create ConfFiles - echo -n " Copying man files in $MANDIR ... "; - cp $MANFILE $MANDIR + #Copy MANFILE to MANDIR + echo -n " Copying man files in $DESTDIR$MANDIR ... "; + install "$MANFILE" "$DESTDIR$MANDIR/man1" 0644 echo "done."; else diff -rU3 qmail-vacation-v1.4m.orig/vacation qmail-vacation-v1.4m/vacation --- qmail-vacation-v1.4m.orig/vacation 2011-04-27 13:24:27.000000000 +0200 +++ qmail-vacation-v1.4m/vacation 2011-04-27 14:15:20.000000000 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!xPERLx # #Version 1.4m # @@ -440,8 +440,8 @@ ############################################################################################# sub get_common_details { - $message_file = ".vacation.msg"; - $dbm_file = ".vacation"; + $message_file = "xMSGFILEx"; + $dbm_file = "xDBMFILEx"; $vacation_msg = << 'EOF'; # Must use single quotes Subject: away from my mail @@ -459,9 +459,9 @@ { &get_common_details(); - $mailprog = "/var/qmail/bin/qmail-inject"; - $aliases = ".vacation.aliases"; - $noreply = ".vacation.noreply"; + $mailprog = "xMAILPROGx"; + $aliases = "xALIASESx"; + $noreply = "xNOREPLYx"; } ############################################################################################# @@ -470,12 +470,12 @@ &get_common_details(); $user = $ENV{'USER'} || $ENV{'LOGNAME'} || getlogin || (getpwuid($>))[0]; - $dot_qmail_file = ".qmail"; - $editor = $ENV{'VISUAL'} || $ENV{'EDITOR'} || 'vi'; + $dot_qmail_file = "xDOTQMAILx"; + $editor = $ENV{'VISUAL'} || $ENV{'EDITOR'} || 'xEDITORx'; $home = (getpwnam($user))[7]; - $mailbox = "$home/Mailbox"; - $pager = $ENV{'PAGER'} || 'less'; - $vacation = "/usr/local/bin/vacation"; + $mailbox = "xMBOXx"; + $pager = $ENV{'PAGER'} || 'xPAGERx'; + $vacation = "xVACATIONx"; $dot_qmail_commands = << "EOF"; # Must use double quotes |preline $vacation $user
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor