Hello community,
here is the log from the commit of package sysconfig
checked in at Mon Sep 29 18:33:59 CEST 2008.
--------
--- sysconfig/sysconfig.changes 2008-09-25 17:54:38.000000000 +0200
+++ /mounts/work_src_done/STABLE/sysconfig/sysconfig.changes 2008-09-29 17:33:14.000000000 +0200
@@ -1,0 +2,12 @@
+Mon Sep 29 17:17:29 CEST 2008 - mt@suse.de
+
+- Set explicit permisions for netconfig generated files instead
+ of prereserveing [wrong] permissions from original (bnc#428458).
+- Improved netconfig check_md5_and_move function to match special
+ comments additionally to the data to improve detection of user
+ modifications, added matching comments to configuration hints
+ and renamed it to netconfig_check_md5_and_move (bnc#428201).
+- Removed incorrect check for empty dns search list skipping the
+ generation of the /etc/resolv.conf file (bnc#429132).
+
+-------------------------------------------------------------------
Old:
----
sysconfig-0.71.6.tar.bz2
sysconfig-netconfig-set-umask.diff
sysconfig-usr_on_nfs-fixes.285472.diff
New:
----
sysconfig-0.71.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sysconfig.spec ++++++
--- /var/tmp/diff_new_pack.E28212/_old 2008-09-29 18:33:35.000000000 +0200
+++ /var/tmp/diff_new_pack.E28212/_new 2008-09-29 18:33:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package sysconfig (Version 0.71.6)
+# spec file for package sysconfig (Version 0.71.7)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@
Name: sysconfig
-Version: 0.71.6
-Release: 2
+Version: 0.71.7
+Release: 1
Summary: The sysconfig scheme
Group: System/Base
License: GPL v2 or later
@@ -30,8 +30,6 @@
BuildRequires: sysfsutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %name-%version.tar.bz2
-Patch0: sysconfig-usr_on_nfs-fixes.285472.diff
-Patch1: sysconfig-netconfig-set-umask.diff
%description
This package provides the SuSE system configuration scheme.
@@ -52,8 +50,6 @@
%prep
%setup -n sysconfig-%{version}
-%patch0 -p0
-%patch1 -p0
%build
autoreconf --force --install
@@ -235,6 +231,15 @@
%{stop_on_removal network}
%changelog
+* Mon Sep 29 2008 mt@suse.de
+- Set explicit permisions for netconfig generated files instead
+ of prereserveing [wrong] permissions from original (bnc#428458).
+- Improved netconfig check_md5_and_move function to match special
+ comments additionally to the data to improve detection of user
+ modifications, added matching comments to configuration hints
+ and renamed it to netconfig_check_md5_and_move (bnc#428201).
+- Removed incorrect check for empty dns search list skipping the
+ generation of the /etc/resolv.conf file (bnc#429132).
* Thu Sep 25 2008 mt@suse.de
- Fixed netconfig scripts to avoid seq usage (bnc#285472).
- Set umask explicitly to 0022 in netconfig to avoid that e.g.
++++++ sysconfig-0.71.6.tar.bz2 -> sysconfig-0.71.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/configure new/sysconfig-0.71.7/configure
--- old/sysconfig-0.71.6/configure 2008-09-25 10:51:19.000000000 +0200
+++ new/sysconfig-0.71.7/configure 2008-09-29 18:10:20.000000000 +0200
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision: 1.13 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for sysconfig 0.71.6.
+# Generated by GNU Autoconf 2.61 for sysconfig 0.71.7.
#
# Report bugs to http://www.suse.de/feedback/.
#
@@ -729,8 +729,8 @@
# Identity of this package.
PACKAGE_NAME='sysconfig'
PACKAGE_TARNAME='sysconfig'
-PACKAGE_VERSION='0.71.6'
-PACKAGE_STRING='sysconfig 0.71.6'
+PACKAGE_VERSION='0.71.7'
+PACKAGE_STRING='sysconfig 0.71.7'
PACKAGE_BUGREPORT='http://www.suse.de/feedback/'
ac_unique_file="scripts/ifup"
@@ -1406,7 +1406,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sysconfig 0.71.6 to adapt to many kinds of systems.
+\`configure' configures sysconfig 0.71.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1476,7 +1476,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sysconfig 0.71.6:";;
+ short | recursive ) echo "Configuration of sysconfig 0.71.7:";;
esac
cat <<\_ACEOF
@@ -1579,7 +1579,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sysconfig configure 0.71.6
+sysconfig configure 0.71.7
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1593,7 +1593,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sysconfig $as_me 0.71.6, which was
+It was created by sysconfig $as_me 0.71.7, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -21217,7 +21217,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sysconfig $as_me 0.71.6, which was
+This file was extended by sysconfig $as_me 0.71.7, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21264,7 +21264,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-sysconfig config.status 0.71.6
+sysconfig config.status 0.71.7
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/convert_for_getconfig new/sysconfig-0.71.7/scripts/convert_for_getconfig
--- old/sysconfig-0.71.6/scripts/convert_for_getconfig 2008-08-18 14:14:17.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/convert_for_getconfig 2008-09-25 16:02:40.000000000 +0200
@@ -376,7 +376,7 @@
#
# first, process everything but aliases
#
-for i in `seq 1 $n`; do
+for i in `eval "echo {0..$n}"`; do
file=${old_names_array[$i]}
# skip aliases
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/functions.netconfig new/sysconfig-0.71.7/scripts/functions.netconfig
--- old/sysconfig-0.71.6/scripts/functions.netconfig 2008-09-25 09:51:50.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/functions.netconfig 2008-09-29 18:09:12.000000000 +0200
@@ -18,7 +18,7 @@
# Authors: Michael Calmer
# Marius Tomaschewski
#
-# $Id: functions.netconfig 1732 2008-09-23 09:06:48Z mt $
+# $Id: functions.netconfig 1753 2008-09-29 16:09:11Z mt $
#
r=$ROOT
@@ -65,12 +65,18 @@
}
#
-# Usage: check_md5_and_move <srcfile> <destfile> [suffix] [err_var]
+# Usage: netconfig_check_md5_and_move <srcfile> <destfile>
+# [suffix] [err_var]
+# [additional match regex]
#
# This function checks the existence of a file and a corresponding
# md5 checksum and tests whether the checksum of the file has changed.
# If it has, nothing further will happen. If not, the "$srcfile"
# will be moved to "$destfile".
+# The additional match regex parameter (default "^###") additionally
+# matches special comments in the generated config file an should avoid,
+# that the user created/modified config gets overwritten when netconfig
+# generates one with exactly same data inside (and modify it later).
#
# The return values of this function:
# RET=0 : file successfuly copied
@@ -79,12 +85,13 @@
# it still exists as $srcfile or in `readline $destfile`.$suffix;
# the err_var variable is set to the name.
# RET=3 : ERROR: another error occured, e.g. some file operation failed
-check_md5_and_move()
+netconfig_check_md5_and_move()
{
- local SRCFILE="$1"
- local DSTFILE="$2"
- local OSUFFIX="$3"
- local ERR_VAR="$4"
+ local SRCFILE=${1}
+ local DSTFILE=${2}
+ local OSUFFIX=${3}
+ local ERR_VAR=${4}
+ local NEW_ERX=${5:-"^###"}
local MD5FILE="$MD5DIR/$DSTFILE"
# DSTFILE may be a symlink on a read only /-fs
local OUTFILE=`read_symlink "${DSTFILE}"`
@@ -96,42 +103,61 @@
mkdir -p "${MD5FILE%/*}" || return 3
local RET=0
- local NEWMD5SUM USERMD5SUM OLDMD5SUM DATE BAKFILE
+ local NEWMD5SUM SRCMD5SUM DSTMD5SUM OLDMD5SUM DATE BAKFILE OLD_ERX
- # create new md5sum
- NEWMD5SUM="`cat "$SRCFILE" | grep -Ev '^#|^[[:space:]]*$' | md5sum`"
+ _read_erx_data()
+ {
+ test "x${1}" = x && return 1
+ awk -v erx="${2}" '
+ { if(length(erx) && match($0, erx) > 0) { print $0; next; } }
+ !/^#|^[[:space:]]*$/ { print $0; }
+ ' "$1"
+ }
+
+ # use old erx if set
+ OLD_ERX="${NEW_ERX}"
+ if test -s "$MD5FILE" ; then
+ OLD_ERX=`awk -- '/^#/ { if(NR==1) print substr($0,2); }' \
+ "$MD5FILE" 2>/dev/null`
+ fi
+ SRCMD5SUM=`_read_erx_data "$SRCFILE" "$OLD_ERX" | md5sum`
+ test "x${OLD_ERX}" = "x${NEW_ERX}" && NEWMD5SUM="$SRCMD5SUM" || \
+ NEWMD5SUM=`_read_erx_data "$SRCFILE" "$NEW_ERX" | md5sum`
+
+ # create empty DSTFILE (via OUTFILE) and reset md5
+ # when the DSTFILE is empty or does not exists ...
if test ! -s "$OUTFILE" ; then
- touch "$OUTFILE" || return 3
+ touch "$OUTFILE" || return 3
+ # check if it exists (via link)
+ test -e "$DSTFILE" || return 3
+ DSTMD5SUM=`echo "" | md5sum`
+ OLDMD5SUM="$DSTMD5SUM"
rm -f "$MD5FILE"
+ { echo "#$OLD_ERX"; echo "$DSTMD5SUM"; } > "$MD5FILE"
+ else
+ DSTMD5SUM=`_read_erx_data "$DSTFILE" "$OLD_ERX" | md5sum`
+ OLDMD5SUM=`grep -Ev "^#" "$MD5FILE" 2>/dev/null`
fi
if test "$FORCE_REPLACE" = true ; then
-
- USERMD5SUM="`cat "$DSTFILE" | grep -Ev '^#|^[[:space:]]*$' | md5sum`"
- test -e "$MD5FILE" || echo "$USERMD5SUM" > "$MD5FILE"
- OLDMD5SUM=`cat "$MD5FILE"`
-
# backup DSTFILE only if it exist with some content and
# was really changed by the user and the new generated
# file has a different content
if [ -s "$OUTFILE" -a \
- "$USERMD5SUM" != "$OLDMD5SUM" -a \
- "$USERMD5SUM" != "$NEWMD5SUM" ]; then
-
+ "$DSTMD5SUM" != "$OLDMD5SUM" -a \
+ "$DSTMD5SUM" != "$SRCMD5SUM" ]; then
DATE=$(date +%Y%m%d-%H%M%S)
BAKFILE="${OUTFILE}.${DATE}"
cp -p --backup=existing "$OUTFILE" "$BAKFILE"
log "force replace set: backup created as $BAKFILE"
fi
- cp -p "$SRCFILE" "$OUTFILE"
+ cp -p "$SRCFILE" "$OUTFILE" # redundant, but...
+ DSTMD5SUM="$SRCMD5SUM"
+ OLDMD5SUM="$SRCMD5SUM"
fi
- USERMD5SUM="`cat "$DSTFILE" | grep -Ev '^#|^[[:space:]]*$' | md5sum`"
- test -e "$MD5FILE" || echo "$USERMD5SUM" > "$MD5FILE"
- OLDMD5SUM=`cat "$MD5FILE"`
- if test "$USERMD5SUM" != "$OLDMD5SUM" -a \
- "$USERMD5SUM" != "$NEWMD5SUM" ; then
-
+ if test "$DSTMD5SUM" != "$OLDMD5SUM" -a \
+ "$DSTMD5SUM" != "$SRCMD5SUM" ; then
log "ATTENTION: You have modified $DSTFILE. Leaving it untouched..."
if test "x$OSUFFIX" != x -a \
"x$SRCFILE" != "${OUTFILE}${OSUFFIX}" && \
@@ -144,7 +170,8 @@
fi
RET=2
else
- if test "$USERMD5SUM" != "$NEWMD5SUM" -o \
+ if test "$DSTMD5SUM" != "$SRCMD5SUM" -o \
+ "$SRCMD5SUM" != "$NEWMD5SUM" -o \
"$FORCE_REPLACE" = "true" ; then
debug "Installing new $DSTFILE"
cp -p "$SRCFILE" "$OUTFILE"
@@ -155,7 +182,11 @@
rm -f "$SRCFILE"
fi
rm -f "$MD5FILE"
- echo "$NEWMD5SUM" > "$MD5FILE"
+ {
+ test "x${NEW_ERX}" != x && \
+ echo "#${NEW_ERX}"
+ echo "$NEWMD5SUM"
+ } > "$MD5FILE"
return $RET
}
@@ -172,7 +203,7 @@
test -z "$1" && return 1
test -z "$2" && return 1
- for i in `seq 0 3`; do
+ for i in {0..3}; do
openLock "$1"
if [ "$?" = "0" ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/ifup-dhcp new/sysconfig-0.71.7/scripts/ifup-dhcp
--- old/sysconfig-0.71.6/scripts/ifup-dhcp 2008-09-23 16:34:55.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/ifup-dhcp 2008-09-26 15:06:32.000000000 +0200
@@ -18,7 +18,7 @@
# Author: Christian Zoz , 2002-2006
# Peter Poeml , 2002-2006
#
-# $Id: ifup-dhcp 1737 2008-09-23 14:04:25Z mt $
+# $Id: ifup-dhcp 1751 2008-09-26 13:06:31Z mt $
#
usage () {
@@ -368,10 +368,6 @@
case "$ACTION" in
start|renew)
- # avoid that the temporary resolv.conf will persist after the client stops
- # just because there hasn't been any resolv.conf to back up
- test -e /etc/resolv.conf || touch /etc/resolv.conf
-
# Create the ntp runtime cache dir before the dhcp client is started.
# Netconfig writes the /var/run/ntp/servers-netconfig file containing
# the ntp server list that is picked up by the ntp init script to apply
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/netconfig new/sysconfig-0.71.7/scripts/netconfig
--- old/sysconfig-0.71.6/scripts/netconfig 2008-09-12 16:09:14.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/netconfig 2008-09-25 17:51:25.000000000 +0200
@@ -18,7 +18,7 @@
# Author: Michael Calmer
# Marius Tomaschewski
#
-# $Id: netconfig 1724 2008-09-12 14:09:13Z mt $
+# $Id: netconfig 1750 2008-09-25 15:51:24Z mt $
#
#
@@ -333,12 +333,16 @@
exit 1
fi
-# FIXME: nfsroot support, don't abort when somebody just calls with "-h"
+# Check if we can write in /tmp
if ! touch $r/tmp &>/dev/null; then
echo "Filesystem read only: Cannot modify anything" >&2
exit 1
fi
+# Set usefull default umask
+umask 0022
+
+# Create state directory
if ! mkdir -p "$STATEDIR" ; then
echo "Unable to create netconfig state directory '$STATEDIR'" >&2
exit 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/netconfig.d/dns-bind new/sysconfig-0.71.7/scripts/netconfig.d/dns-bind
--- old/sysconfig-0.71.6/scripts/netconfig.d/dns-bind 2008-09-22 16:41:18.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/netconfig.d/dns-bind 2008-09-29 17:15:02.000000000 +0200
@@ -64,16 +64,20 @@
TMP_FILE=`mktemp "${DST_FILE}.XXXXXX"` || return 1
if test ! -s "$DST_FILE" ; then
- touch "$DST_FILE"
+ touch "$DST_FILE" ; chmod 644 "$DST_FILE"
fi
# * copy dest => tmp to get the file attributes
# * remove the content
# * print a warning on top of this file
- cp -p "$DST_FILE" "$TMP_FILE"
+ #cp -p "$DST_FILE" "$TMP_FILE"
+
+ # set explicit mode on tmp file instead to preserve the
+ # mode of original file that can be wrong (bnc#428458)
+ chmod 644 "$TMP_FILE"
+
cat << EOT > "$TMP_FILE"
-#
-# This file is autogenerated by netconfig!
+### $DESTFILE file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
@@ -84,12 +88,14 @@
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
+# See also the netconfig(8) manual page and other documentation.
+#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
-# only and in case of a "netconfig update -f" call.
-#
-# See also the netconfig(8) manual page and other documentation.
+# only, the netconfig settings are same with settings in this
+# file and in case of a "netconfig update -f" call.
#
+### Please remove (at least) this line when you modify the file!
EOT
for ns in $1; do
@@ -111,7 +117,7 @@
echo "};"
} >> "$TMP_FILE"
- check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
+ netconfig_check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
return $?
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/netconfig.d/dns-dnsmasq new/sysconfig-0.71.7/scripts/netconfig.d/dns-dnsmasq
--- old/sysconfig-0.71.6/scripts/netconfig.d/dns-dnsmasq 2008-09-22 16:41:33.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/netconfig.d/dns-dnsmasq 2008-09-29 17:14:35.000000000 +0200
@@ -61,16 +61,20 @@
TMP_FILE=`mktemp "${DST_FILE}.XXXXXX"` || return 1
if test ! -s "$DST_FILE" ; then
- touch "$DST_FILE"
+ touch "$DST_FILE" ; chmod 644 "$DST_FILE"
fi
# * copy dest => tmp to get the file attributes
# * remove the content
# * print a warning on top of this file
- cp -p "$DST_FILE" "$TMP_FILE"
+ #cp -p "$DST_FILE" "$TMP_FILE"
+
+ # set explicit mode on tmp file instead to preserve the
+ # mode of original file that can be wrong (bnc#428458)
+ chmod 644 "$TMP_FILE"
+
cat << EOT > "$TMP_FILE"
-#
-# This file is autogenerated by netconfig!
+### $DESTFILE file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
@@ -81,12 +85,14 @@
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
+# See also the netconfig(8) manual page and other documentation.
+#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
-# only and in case of a "netconfig update -f" call.
-#
-# See also the netconfig(8) manual page and other documentation.
+# only, the netconfig settings are same with settings in this
+# file and in case of a "netconfig update -f" call.
#
+### Please remove (at least) this line when you modify the file!
EOT
for ns in $1; do
@@ -110,7 +116,7 @@
} >> "$TMP_FILE"
fi
- check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
+ netconfig_check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
return $?
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/netconfig.d/dns-resolver new/sysconfig-0.71.7/scripts/netconfig.d/dns-resolver
--- old/sysconfig-0.71.6/scripts/netconfig.d/dns-resolver 2008-09-22 16:41:50.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/netconfig.d/dns-resolver 2008-09-29 17:14:50.000000000 +0200
@@ -50,32 +50,40 @@
function write_resolv_conf()
{
- test -z "$1" && return 1
#
- # empty nameserver is a valid value
+ # empty search list is a valid value
+ #
+ #test -z "$1" && return 1
+ #
+ # empty nameserver is a valid value too
+ # (empty at least in the forwarder mode)
#
#test -z "$2" && return 1
- debug "write_resolv_conf: $1 $2"
+ debug "write_resolv_conf: '$1' '$2'"
local SEARCHLIST=()
local NAMESERVER=()
# DESTFILE may be a symlink on a read only /-fs
DST_FILE=`read_symlink "${DESTFILE}"`
- TMP_FILE=`mktemp "${DESTFILE}.XXXXXX"` || return 1
+ TMP_FILE=`mktemp "${DST_FILE}.XXXXXX"` || return 1
- if test ! -s "$DESTFILE" ; then
- touch "$DESTFILE"
+ if test ! -s "$DST_FILE" ; then
+ touch "$DST_FILE" ; chmod 644 "$DST_FILE"
fi
# * copy dest => tmp to get the file attributes
# * remove the content
# * print a warning on top of this file
- cp -p "$DESTFILE" "$TMP_FILE"
+ #cp -p "$DST_FILE" "$TMP_FILE"
+
+ # set explicit mode on tmp file instead to preserve the
+ # mode of original file that can be wrong (bnc#428458)
+ chmod 644 "$TMP_FILE"
+
cat << EOT > "$TMP_FILE"
-#
-# This file is autogenerated by netconfig!
+### $DESTFILE file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
@@ -86,12 +94,14 @@
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
+# See also the netconfig(8) manual page and other documentation.
+#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
-# only and in case of a "netconfig update -f" call.
-#
-# See also the netconfig(8) manual page and other documentation.
+# only, the netconfig settings are same with settings in this
+# file and in case of a "netconfig update -f" call.
#
+### Please remove (at least) this line when you modify the file!
EOT
for nd in $1; do
@@ -131,7 +141,7 @@
} >> "$TMP_FILE"
fi
- check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
+ netconfig_check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
return $?
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/netconfig.d/nis new/sysconfig-0.71.7/scripts/netconfig.d/nis
--- old/sysconfig-0.71.6/scripts/netconfig.d/nis 2008-09-22 16:44:38.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/netconfig.d/nis 2008-09-29 17:14:30.000000000 +0200
@@ -132,16 +132,20 @@
TMP_FILE=`mktemp "${DST_FILE}.XXXXXX"`
if test ! -s "$DST_FILE" ; then
- touch "$DST_FILE"
+ touch "$DST_FILE" ; chmod 644 "$DST_FILE"
fi
# * copy dest => tmp to get the file attributes
# * remove the content
# * print a warning on top of this file
- cp -p "$DST_FILE" "$TMP_FILE"
+ #cp -p "$DST_FILE" "$TMP_FILE"
+
+ # set explicit mode on tmp file instead to preserve the
+ # mode of original file that can be wrong (bnc#428458)
+ chmod 644 "$TMP_FILE"
+
cat << EOT > "$TMP_FILE"
-#
-# This file is autogenerated by netconfig!
+### $DESTFILE file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static NIS configuration using the following variables in the
@@ -151,12 +155,14 @@
# or disable NIS configuration updates via netconfig by setting:
# NETCONFIG_NIS_POLICY=''
#
+# See also the netconfig(8) manual page and other documentation.
+#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
-# only and in case of a "netconfig update -f" call.
-#
-# See also the netconfig(8) manual page and other documentation.
+# only, the netconfig settings are same with settings in this
+# file and in case of a "netconfig update -f" call.
#
+### Please remove (at least) this line when you modify the file!
EOT
if [ ${#NIS_YPSRV_ENTRIES[@]} -gt 0 ]; then
@@ -187,7 +193,7 @@
echo "broadcast" >> "$TMP_FILE"
fi
- check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
+ netconfig_check_md5_and_move "$TMP_FILE" "$DESTFILE" ".netconfig" TMP_FILE
return $?
}
@@ -201,7 +207,7 @@
"$NETCONFIG_NIS_STATIC_SERVERS"
fi
- for i in `seq 0 99`; do
+ for i in {0..99} ; do
nis_dom="NETCONFIG_NIS_STATIC_DOMAIN_$i"
nis_srv="NETCONFIG_NIS_STATIC_SERVERS_$i"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/scripts/netconfig.d/ntp-runtime new/sysconfig-0.71.7/scripts/netconfig.d/ntp-runtime
--- old/sysconfig-0.71.6/scripts/netconfig.d/ntp-runtime 2008-09-22 16:45:25.000000000 +0200
+++ new/sysconfig-0.71.7/scripts/netconfig.d/ntp-runtime 2008-09-29 17:14:43.000000000 +0200
@@ -58,21 +58,24 @@
TMP_FILE=`mktemp "$r/tmp/ntp-servers-netconfig.XXXXXX"` || return 1
- #
# make sure that the directory exists
mkdir -p "${DESTFILE%/*}"
if test ! -s "$DESTFILE" ; then
- touch "$DESTFILE"
+ touch "$DESTFILE" ; chmod 644 "$DESTFILE"
fi
# * copy dest => tmp to get the file attributes
# * remove the content
# * print a warning on top of this file
- cp -p "$DESTFILE" "$TMP_FILE"
+ #cp -p "$DESTFILE" "$TMP_FILE"
+
+ # set explicit mode on tmp file instead to preserve the
+ # mode of original file that can be wrong (bnc#428458)
+ chmod 644 "$TMP_FILE"
+
cat << EOT > "$TMP_FILE"
-#
-# This file is autogenerated by netconfig!
+### $DESTFILE file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static NTP configuration using the following variables in the
@@ -81,12 +84,14 @@
# or disable NTP configuration updates via netconfig by setting:
# NETCONFIG_NTP_POLICY=''
#
+# See also the netconfig(8) manual page and other documentation.
+#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
-# only and in case of a "netconfig update -f" call.
-#
-# See also the netconfig(8) manual page and other documentation.
+# only, the netconfig settings are same with settings in this
+# file and in case of a "netconfig update -f" call.
#
+### Please remove (at least) this line when you modify the file!
EOT
for ns in $1; do
@@ -101,7 +106,7 @@
echo "RUNTIME_SERVERS='${SERVERS[@]}'" >> "$TMP_FILE"
fi
- check_md5_and_move "$TMP_FILE" "$DESTFILE"
+ netconfig_check_md5_and_move "$TMP_FILE" "$DESTFILE"
return $?
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.6/VERSION new/sysconfig-0.71.7/VERSION
--- old/sysconfig-0.71.6/VERSION 2008-09-25 10:38:08.000000000 +0200
+++ new/sysconfig-0.71.7/VERSION 2008-09-29 17:35:46.000000000 +0200
@@ -1 +1 @@
-0.71.6
+0.71.7
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org