From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6 Description of problem: The the bash builtin "enable" command clashes with the binary enable command thus forcing you to call it by it's full path name /usr/bin/enable. It wouldn't be such a big deal except that lpc doesn't support enable functions under cups. So, the only way to enable a printer is to /usr/bin/enable (unless I am missing some new fangled way to enable printers). Version-Release number of selected component (if applicable): cups-1.1.17-13 How reproducible: Always Steps to Reproduce: 1. disable prt0 2. enable prt0 Actual Results: # enable prt0 -bash: enable: prt0: not a shell builtin Expected Results: enable should call /usr/bin/enable. Additional info: # /usr/bin/enable prt0 # lpq prt0 is ready no entries
You can override bash builtin commands by simply creating an alias. $ alias enable=/usr/bin/enable You can add this to your local .bashrc or system-wide, if necessary.
While it's unfortunate, it's not really something that can be fixed. :-(
I believe Debian renamed the command cups-enable (and cups-disable).
That's not a bad idea. Next build will pick this up.
Great job, great idea.Thanks!
Correction: Debian didn´t rename the commands cups-enable and cups-disable. What they did is symlink cupsaccept, cupsreject, cupsdisable and cupsenable to /usr/sbin/accept (much like reject, disable, and enable are already symlinks to accept), and patch accept.c to strip the cups prefix from the commands. The advantage of that solution is that it doesn´t break current behavior. Whatever method is chosen, I think it would be a good idea to use Debian´s names for the commands (i.e. without the hyphen) for better consistency between distros. One area that needed some work in the Debian patch that I looked at (the one for Woody) are the manpages. Looks like they only added symlinks to the original manpages, which means 'man cupsenable' displays usage instructions for the enable command.
Created attachment 100601 [details] 1st hunk is patch, 2nd shows all symlinks. This was extracted from Debian Woody's cupsys_1.1.14-5.diff. As you can see, accept determines what to do based on how it was called (argv[0]). The patch strips the cups prefix and then lets accept continue as usual. Ideally, the manpages for accept, reject, enable, disable should be patched to mention cupsaccept, etc as well.
Created attachment 100804 [details] Patch including symlinks and manpages I've made a patch that includes hunks for symlinks and manpages. I hope it does all that's required. Note that I've used cupsdisable and cupsenable without the hyphens. This is for consistency with Debian systems and with other commands provided by CUPS such as cupstestppd and cupsaddsmb.
Thanks. I've incorporated this into 1.1.21-0.rc1.1.