summaryrefslogtreecommitdiff
path: root/usr/src/cmd/print/scripts
diff options
context:
space:
mode:
authorjacobs <none@none>2007-04-09 17:13:22 -0700
committerjacobs <none@none>2007-04-09 17:13:22 -0700
commit53ac4dca2d62281a883fb28d174b000643cd3bfa (patch)
tree96affe7b6923a7c3bcffb8dc404752f4b99e615b /usr/src/cmd/print/scripts
parent46736d35df047bb400483364f76bfcb08cdcbb25 (diff)
downloadillumos-gate-53ac4dca2d62281a883fb28d174b000643cd3bfa.tar.gz
6222297 lpsched and lpshut should be corrected/removed from exec_attr
6454630 print subsystem enable and disable commands not RBAC capable 6538881 lpadmin cannot create queue even with Print Management profile 6539897 uri interface script should handle common device-uri forms
Diffstat (limited to 'usr/src/cmd/print/scripts')
-rw-r--r--usr/src/cmd/print/scripts/lpadmin8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/cmd/print/scripts/lpadmin b/usr/src/cmd/print/scripts/lpadmin
index 4a436b646b..ff609062a1 100644
--- a/usr/src/cmd/print/scripts/lpadmin
+++ b/usr/src/cmd/print/scripts/lpadmin
@@ -32,10 +32,12 @@ PATH=/bin:/usr/bin:/usr/sbin export PATH
TEXTDOMAIN="SUNW_OST_OSCMD"
export TEXTDOMAIN
+PFEXEC=/usr/bin/pfexec
LPSET=/usr/bin/lpset
LPGET=/usr/bin/lpget
LPSTAT=/usr/bin/lpstat
LPADMIN=/usr/lib/lp/local/lpadmin
+LPFILTER=/usr/sbin/lpfilter
COMM=/usr/bin/comm
PPDMGR=/usr/sbin/ppdmgr
@@ -58,7 +60,7 @@ usage() {
lp_config_filters() {
if [[ ! -f /etc/lp/filter.table ]] ; then
cd /etc/lp/fd ; for filter in *.fd ; do
- /usr/sbin/lpfilter \
+ ${PFEXEC} ${LPFILTER} \
-f $(/usr/bin/basename $filter .fd) \
-F $filter
done
@@ -107,7 +109,7 @@ delete_all() {
# $2 - label name (optional)
add_new_ppd_file() {
# Add new ppd file and echo full path it was actually saved to
- ppdmgrcmd="${PPDMGR} -a ${1} -w"
+ ppdmgrcmd="${PFEXEC} ${PPDMGR} -a ${1} -w"
ppderrfile=/tmp/lpadminerror.$$
ppd_file=$(${ppdmgrcmd} 2>${ppderrfile})
@@ -308,7 +310,7 @@ if [[ -x ${LPADMIN} && -n "${local}" ]] ; then
fi
# modify LP destination(s)
- CMD=${LPADMIN}
+ CMD="${PFEXEC} ${LPADMIN}"
while [[ -n "$*" ]] ; do # to deal with multi-word arguments
CMD="$CMD \"$1\""
# replace the ppd_file originally specified with the -n option