Printing setup script
Terry Mackintosh <terry-Iwt3gjr5Qw3AwKckeXIILgC/[email protected]> Sat, 11 Aug 2007 10:58:00 -0400
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------000505070802030300090803 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi all For me printing is one area of rock that has always been a pain in the ass. Maybe I just don't know how to do it, don't know. In any event it seemed to me that the logical place to configure printing from was stone. As I recall there used to be something there that did not work, but as of the latest 2.0.3 build that I did some time ago, there is nothing. My understanding of setting up printing is weak, but I wrote the attached script to go in /etc/stone.d/ called mod_printing.sh. It works for setting up cups, and may work for setting up lprng, see comments in script. Someone else can surely do better, I only offer this up because no one else has. Possibly there is something better in the current trunk that I don't know about? Make it a great day -- Terry Mackintosh <terry-Iwt3gjr5Qw3AwKckeXIILgC/[email protected]> http://www.mackintoshweb.com/mars/ Mars Society, FL chapter. Proudly powered by ROCKLinux, Apache, PHP, PostgreSQL, etc. "If you don't know where you are going, how can you get there?" --------------000505070802030300090803 Content-Type: text/x-sh; name="mod_printing.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mod_printing.sh" # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/openssh/stone_mod_sshd.sh # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at http://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- # # [MAIN] 30 printing Print system configuration create_links_cups(){ echo "Stopping LPRng (lpd), should it be running." /etc/rc.d/init.d/lpd stop echo -e "\nRemoving old files and setting up new links:" for f in /usr/bin/*_cups /usr/sbin/*_cups; do ln -fvs $f ${f/%_cups/} done echo -e "\nRemoving LPRng from all runlevels (if any) to avoid any conflicts:" for rl in 1 2 3 4 5 ; do rm -vf /etc/rc.d/rc$rl.d/S??lpd done echo -e "\nRemember:\nUse a browser to configure/manage printers at:" echo -e "http://localhost:631/admin\n" read -p "Press ENTER to continue with setting run levels for CUPS." $STONE runlevel edit_srv cups } create_links_lprng(){ echo "Stopping CUPS, should it be running." /etc/rc.d/init.d/cups stop echo -e "\nNOTE: I've not been able to figure out how to setup printers for LPRng!" echo "So this is basically UNTESTED! Though it may work if you know how to" echo "setup the printers?" echo -e "\nRemoving old files and setting up new links:" for f in /usr/bin/*_lprng /usr/sbin/*_lprng; do ln -fvs $f ${f/%_lprng/} done echo -e "\nRemoving CUPS from all runlevels (if any) to avoid any conflicts:" for rl in 1 2 3 4 5 ; do rm -vf /etc/rc.d/rc$rl.d/S??cups done read -p "Press ENTER to continue with setting run levels for LPRng (lpd)." $STONE runlevel edit_srv lpd } main() { while gui_menu printing 'Printing System Configuration.' \ 'Set CUPS as system print spooler. (recomended)' \ 'create_links_cups' \ 'Set LPRng as system print spooler. (untested)' \ 'create_links_lprng' do : ; done } --------------000505070802030300090803 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rock-devel mailing list [email protected] http://www.rocklinux.net/mailman/listinfo/rock-devel --------------000505070802030300090803--