Changeset 5167


Ignore:
Timestamp:
Jun 14, 2017, 4:48:59 PM (18 months ago)
Author:
daduve
Message:

Adding diversion for cupsd.conf

Location:
n4d-cups/trunk/fuentes
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • n4d-cups/trunk/fuentes/debian/n4d-cups.postinst

    r606 r5167  
    44
    55case "$1" in
    6    configure|upgrade)
     6   configure)
     7        PKG="n4d-cups"
     8        ORIGINAL_FILE="/etc/cups/cupsd.conf"
     9        NEW_DIVERTED_FILE="/etc/cups/cupsd.conf.diverted"
     10        LLIUREX_FILE="/etc/cups/cupsd.conf.lliurex"
     11       
     12        if [ ! -L "$ORIGINAL_FILE" ]; then
     13
     14                systemctl stop cups || true
     15                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_FILE"
     16                ln -s "$LLIUREX_FILE" "$ORIGINAL_FILE"
     17                systemctl start cups || true
     18
     19        fi
     20       
    721        n4d-modules enable-plugin /etc/n4d/conf.d/CupsManager || true
    822        ;;
     23   upgrade)
     24        n4d-modules enable-plugin /etc/n4d/conf.d/CupsManager || true
     25        ;;
    926   abort-upgrade|abort-remove|abort-deconfigure)
    1027        ;;
Note: See TracChangeset for help on using the changeset viewer.