source: debian/inst/edit-lpd.conf @ 2babe17

debianmacno-cupsnodebathenaweb
Last change on this file since 2babe17 was 2babe17, checked in by Jessica Hamrick <jhamrick@…>, 16 years ago

Installing the debian package should make the printing of music files
to the lprmp3 printer work. Still need to add in support for uninstalling
the package and using debconf (so users can add in their own configuration)

  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/bin/sh
2
3# add the printcap path to lpd.conf
4if [ -e /etc/lprng/lpd.conf ]; then
5    mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak
6    touch /etc/lprng/lpd.conf   
7
8    while read line; do
9        printcap=$(echo "$line" | grep ^printcap_path=)
10        if [ -n "$printcap" ]; then
11            lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap)
12            printcap=$(echo "$line" | grep /etc/printcap)
13            if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then
14                echo "#$line" >> /etc/lprng/lpd.conf
15                echo "$line" | sed 's,printcap_path=,printcap_path=/etc/lprng/printcap:\|,' >> /etc/lprng/lpd.conf
16            else
17                echo "$line" >> /etc/lprng/lpd.conf
18            fi
19        else
20            echo "$line" >> /etc/lprng/lpd.conf
21        fi
22    done < /etc/lprng/lpd.conf.bak
23    rm /etc/lprng/lpd.conf.bak
24else
25    touch /etc/lprng/lpd.conf
26    echo "printcap_path=/etc/lprng/printcap" >> /etc/lprng/lpd.conf
27fi
28
29# add lpd_listen_port to lpd.conf
30lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515)
31if [ ! -n "$lpd_listen_port" ]; then
32    echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf
33fi
Note: See TracBrowser for help on using the repository browser.