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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.