Hello community, here is the log from the commit of package nss-mdns for openSUSE:Factory checked in at 2020-05-26 17:14:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nss-mdns (Old) and /work/SRC/openSUSE:Factory/.nss-mdns.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nss-mdns" Tue May 26 17:14:23 2020 rev:29 rq:807577 version:0.14.1 Changes: -------- --- /work/SRC/openSUSE:Factory/nss-mdns/nss-mdns.changes 2019-05-03 22:18:32.192238282 +0200 +++ /work/SRC/openSUSE:Factory/.nss-mdns.new.2738/nss-mdns.changes 2020-05-26 17:15:08.347432551 +0200 @@ -1,0 +2,6 @@ +Tue May 19 10:48:50 UTC 2020 - Andreas Schwab <[email protected]> + +- nss-mdns-config: Use /usr/etc/nsswitch.conf as input if + /etc/nsswitch.conf doesn't exist yet + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nss-mdns.spec ++++++ --- /var/tmp/diff_new_pack.gznBWE/_old 2020-05-26 17:15:11.399439168 +0200 +++ /var/tmp/diff_new_pack.gznBWE/_new 2020-05-26 17:15:11.399439168 +0200 @@ -1,7 +1,7 @@ # # spec file for package nss-mdns # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++++++ nss-mdns-config ++++++ --- /var/tmp/diff_new_pack.gznBWE/_old 2020-05-26 17:15:11.455439289 +0200 +++ /var/tmp/diff_new_pack.gznBWE/_new 2020-05-26 17:15:11.455439289 +0200 @@ -36,6 +36,7 @@ # NSSWITCH=/etc/nsswitch.conf +NSSWITCH_VENDOR=/usr/etc/nsswitch.conf usage() { echo "nss-mdns-config [--enable|--disable] [-4|-6] [--no-backup]" @@ -78,14 +79,20 @@ IPvALL=1 fi -if test ! -f "$NSSWITCH"; then +if test ! -f "$NSSWITCH" && test ! -f "$NSSWITCH_VENDOR"; then if test "$ENABLE" -ne 1 -a "$DISABLE" -ne 1; then echo "No $NSSWITCH file." fi exit 0 fi -HOSTS=$(grep -m1 "^\s*hosts:" "$NSSWITCH") +if test ! -f "$NSSWITCH"; then + NSSWITCH_IN=$NSSWITCH_VENDOR +else + NSSWITCH_IN=$NSSWITCH +fi + +HOSTS=$(grep -m1 "^\s*hosts:" "$NSSWITCH_IN") if test $? -ne 0; then echo "No hosts configuration in $NSSWITCH." @@ -155,7 +162,9 @@ NEWVALUE=$(echo $NEWVALUE | sed "s/^\s*//;s/^\s*$//") - if test "$BACKUP" -eq 1; then + if test "$NSSWITCH_IN" = "$NSSWITCH_VENDOR"; then + cp -a "$NSSWITCH_IN" "$NSSWITCH" + elif test "$BACKUP" -eq 1; then cp -a "$NSSWITCH" "${NSSWITCH}bak" fi sed -i "s/\(^\s*hosts:\s*\).*/\1$NEWVALUE/" "$NSSWITCH" @@ -225,7 +234,9 @@ NEWVALUE=$(echo $NEWVALUE | sed "s/^\s*//;s/^\s*$//") - if test "$BACKUP" -eq 1; then + if test "$NSSWITCH_IN" = "$NSSWITCH_VENDOR"; then + cp -a "$NSSWITCH_IN" "$NSSWITCH" + elif test "$BACKUP" -eq 1; then cp -a "$NSSWITCH" "${NSSWITCH}bak" fi sed -i "s/\(^\s*hosts:\s*\).*/\1$NEWVALUE/" "$NSSWITCH"
