Changeset 1925


Ignore:
Timestamp:
Dec 28, 2008, 1:01:02 AM (16 years ago)
Author:
price
Message:

xvm-iscsi-config: print restart message only if settings actually changed

also, don't fail in prerm if /etc/invirt/conf.d/iscsi missing

Location:
trunk/packages/xvm-iscsi-config/debian
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/xvm-iscsi-config/debian/changelog

    r1923 r1925  
     1xvm-iscsi-config (0.0.5) unstable; urgency=low
     2
     3  * check automatically if settings changed in postinst,
     4    print "restart iscsi" message only if they did
     5  * don't fail in prerm if /etc/invirt/conf.d/iscsi missing
     6
     7 -- Greg Price <price@mit.edu>  Sun, 28 Dec 2008 00:58:01 -0500
     8
    19xvm-iscsi-config (0.0.4) unstable; urgency=low
    210
  • trunk/packages/xvm-iscsi-config/debian/xvm-iscsi-config.postinst

    r1923 r1925  
    3636        db_stop
    3737       
     38        if [ -e /etc/invirt/conf.d/iscsi ]; then
     39          # invirt.config.run_parts_list excludes backup filenames.
     40          mv -f /etc/invirt/conf.d/iscsi /etc/invirt/conf.d/iscsi~
     41        fi
    3842        cat >/etc/invirt/conf.d/iscsi <<EOF
    3943iscsi:
     
    4650            invoke-rc.d open-iscsi restart
    4751            iscsiadm -m discovery -t st -p $(invirt-getconf iscsi.address):3260
    48         else
    49             # Don't disrupt an existing installation.
    50             cat <<EOF
    51 xvm-iscsi-config: If the configuration has changed, restart iscsi:
     52        elif ! diff /etc/invirt/conf.d/iscsi~ /etc/invirt/conf.d/iscsi >/dev/null; then
     53              cat <<EOF
     54xvm-iscsi-config: The configuration has changed.  Restart iscsi:
    5255  /etc/init.d/xvm-iscsi-config restart
    5356  /etc/init.d/open-iscsi restart
  • trunk/packages/xvm-iscsi-config/debian/xvm-iscsi-config.prerm

    r1496 r1925  
    1919
    2020case "$1" in
    21     remove|upgrade|deconfigure)
    22         rm /etc/invirt/conf.d/iscsi
     21    remove|deconfigure)
     22        rm -f /etc/invirt/conf.d/iscsi
    2323    ;;
    2424
    25     failed-upgrade)
     25    upgrade|failed-upgrade)
    2626    ;;
    2727
Note: See TracChangeset for help on using the changeset viewer.