The Samba-Bugzilla – Attachment 6170 Details for
Bug 7836
A newly added printer isn't visbile to clients
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
reload printers test script
smbd_cups_pcap_test.sh (text/plain), 1.34 KB, created by
David Disseldorp
on 2010-12-27 12:17:33 UTC
(
hide
)
Description:
reload printers test script
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2010-12-27 12:17:33 UTC
Size:
1.34 KB
patch
obsolete
>#!/bin/bash > >PRINTER_NAME=dummy0 >PRINTER_DEV=/dev/null > >_fatal() >{ > local str=$* > > echo "fatal: $str" > exit 1 >} > >_smb_printer_check() >{ > local printer=$* > > smbclient -N -L localhost 2>&1 | grep $printer &> /dev/null > return $? >} > >_test_add_remove() >{ > local reload_action=$1 > > `lpstat -p | grep $PRINTER_NAME > /dev/null` \ > && _fatal "printer $PRINTER_NAME exists, cleanup needed" > > echo "testing printer addition with reload action: $reload_action..." > lpadmin -p $PRINTER_NAME -E -v $PRINTER_DEV \ > || _fatal "failed to add printer $PRINTER_NAME" > > `$reload_action &> /dev/null` || _fatal "$reload_action failed" > > sleep 1 # allow 1s for printer to appear > > _smb_printer_check $PRINTER_NAME \ > || _fatal "new printer did not appear after reload" > > echo "- passed" > > echo "testing printer removal with reload action: $reload_action" > lpadmin -x $PRINTER_NAME \ > || _fatal "failed to remove printer $PRINTER_NAME" > > `$reload_action &> /dev/null` || _fatal "$reload_action failed" > > sleep 1 > > _smb_printer_check $PRINTER_NAME \ > && _fatal "printer did not disappear after reload" > echo "- passed" >} > > >PCAP_CACHE_TIME=`testparm -s --parameter-name="printcap cache time" 2>/dev/null` >[ $? -eq 0 ] || _fatal "failed to get printcap cache time" > >_test_add_remove "smbcontrol smbd reload-config" >_test_add_remove "killall -HUP smbd" >_test_add_remove "sleep $PCAP_CACHE_TIME" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7836
:
6104
|
6105
|
6106
|
6107
|
6112
|
6113
|
6114
|
6115
|
6116
|
6117
|
6154
| 6170 |
6186
|
6188
|
6190
|
6191
|
6208
|
6209
|
6474
|
6475