diff options
Diffstat (limited to 'usr.sbin/lpr/lp/lp.sh')
-rw-r--r-- | usr.sbin/lpr/lp/lp.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/lpr/lp/lp.sh b/usr.sbin/lpr/lp/lp.sh index e7c0688..03ad887 100644 --- a/usr.sbin/lpr/lp/lp.sh +++ b/usr.sbin/lpr/lp/lp.sh @@ -41,6 +41,8 @@ ncopies="" symlink="-s" +mailafter="" +title="" # Posix says LPDEST gets precedence over PRINTER dest=${LPDEST:-${PRINTER:-lp}} @@ -51,7 +53,7 @@ dest=${LPDEST:-${PRINTER:-lp}} # XXX We include the -s flag as a dummy. SUSv2 requires it, # although we do not yet emit the affected messages. # -while getopts "cd:n:o:s" option +while getopts "cd:mn:o:st:" option do case $option in @@ -59,12 +61,16 @@ do symlink="";; d) # destination dest="${OPTARG}";; + m) # mail after job + mailafter="-m";; n) # number of copies ncopies="-#${OPTARG}";; o) # (printer option) : ;; s) # (silent option) : ;; + t) # title for banner page + title="-J${OPTARG}";; *) # (error msg printed by getopts) exit 2;; esac @@ -72,4 +78,4 @@ done shift $(($OPTIND - 1)) -exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} "$@" +exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} "${title}" "$@" |