Changeset 5115


Ignore:
Timestamp:
Jun 8, 2017, 11:38:56 AM (22 months ago)
Author:
hectorgh
Message:

disabling ntp in clients

Location:
lliurex-artwork-defaults/trunk/fuentes/debian
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lliurex-artwork-defaults/trunk/fuentes/debian/changelog

    r5069 r5115  
     1lliurex-artwork-defaults (5.3.9) xenial; urgency=high
     2
     3  * Disabling ntp in clients
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Thu, 08 Jun 2017 11:36:24 +0200
     6
    17lliurex-artwork-defaults (5.3.8) xenial; urgency=high
    28
  • lliurex-artwork-defaults/trunk/fuentes/debian/lliurex-artwork-defaults-client.postinst

    r1846 r5115  
    77
    88if  [ "$1" = "configure" ] ; then
     9
     10        # Disabling ntp in clients
     11       
     12        PKG="lliurex-artwork-defaults-client"
     13        ORIGINAL_FILE="/etc/init.d/ntp"
     14        NEW_DIVERTED_FILE="/etc/init.d/ntp.diverted"
     15        LLIUREX_FILE="/bin/true"
     16       
     17        if [ ! -L "$ORIGINAL_FILE" ]; then
     18
     19                systemctl stop ntp || true
     20                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_FILE"
     21                ln -s "$LLIUREX_FILE" "$ORIGINAL_FILE"
     22
     23        fi
     24
    925
    1026        #update dconf database, as we droped new settings
  • lliurex-artwork-defaults/trunk/fuentes/debian/lliurex-artwork-defaults-client.prerm

    r2341 r5115  
    44
    55
     6if [ "$1" = "remove" ] ; then
     7       
     8
     9        PKG="lliurex-artwork-defaults-client"
     10        ORIGINAL_FILE="/etc/init.d/ntp"
     11        NEW_DIVERTED_FILE="/etc/init.d/ntp.diverted"
     12        LLIUREX_FILE="/bin/true"
     13
     14
     15        if [ -L "$ORIGINAL_FILE" ]; then
     16                rm -rf "$ORIGINAL_FILE" || true
     17                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_FILE"
     18                systemctl start ntp || true
     19
     20        fi
     21
     22
     23
     24fi
    625#DEBHELPER#
    726
Note: See TracChangeset for help on using the changeset viewer.