Changeset 804


Ignore:
Timestamp:
Mar 7, 2016, 2:59:56 PM (3 years ago)
Author:
hectorgh
Message:

wip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • n4d-samba/trunk/fuentes/debian/postinst

    r186 r804  
    1919
    2020
     21PACKAGE_NAME="n4d-samba"
     22ORIGINAL_FILE="/etc/init.d/smbd"
     23DIVERT_FILE="/usr/share/n4d-ldap/diversions/etc.initd.smbd.divert"
     24LLIUREX_FILE="/usr/sbin/smbd-daemon-starter"
     25
     26
    2127case "$1" in
    2228    configure)
     
    3642        n4d-modules enable-plugin /etc/n4d/conf.d/SambaSIDFixer || true
    3743       
     44
     45        if [ -e "$ORIGINAL_FILE" ]; then
     46
     47                update-rc.d smbd disable 2 3 4 5 || true
     48                dpkg-divert --package ${PACKAGE_NAME} --rename --quiet --add --divert  ${DIVERT_FILE}  ${ORIGINAL_FILE}
     49                ln -s ${DIVERT_FILE} ${LLIUREX_FILE}
     50                systemctl daemon-reload || true
     51                systemctl enable smbd || true
     52
     53        fi
     54
     55
     56
     57
     58
    3859        ;;
     60
     61
    3962
    4063
Note: See TracChangeset for help on using the changeset viewer.