rpms/ypbind/devel nis.sh,1.2,1.3 ypbind.spec,1.59,1.60

Vitezslav Crhonek vcrhonek at fedoraproject.org
Thu Feb 26 14:57:39 UTC 2009


Author: vcrhonek

Update of /cvs/extras/rpms/ypbind/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23402

Modified Files:
	nis.sh ypbind.spec 
Log Message:
Fix ypbind script in dos format - bash syntax errors


Index: nis.sh
===================================================================
RCS file: /cvs/extras/rpms/ypbind/devel/nis.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- nis.sh	19 Feb 2009 14:25:46 -0000	1.2
+++ nis.sh	26 Feb 2009 14:57:09 -0000	1.3
@@ -1,97 +1,97 @@
-#!/bin/bash
-#
-# nis.sh: dhclient-script plugin for NIS settings,
-#         place in /etc/dhcp/dhclient.d and 'chmod +x nis.sh' to enable
-#
-# Copyright (C) 2008 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Author(s): David Cantrell <dcantrell at redhat.com>
-#
-
-CONF=/etc/yp.conf
-
-save_config_file() {
-    origfile="${1}"
-    savefile="${SAVEDIR}/${origfile##*/}.predhclient.${interface}"
-
-    if [ ! -d ${SAVEDIR} ]; then
-        mkdir -p ${SAVEDIR}
-    fi
-
-    if [ -e ${origfile} ]; then
-        mv ${origfile} ${savefile}
-    else
-        echo > ${savefile}
-    fi
-
-    restorecon ${savefile} >/dev/null 2>&1
-}
-
-nis_config() {
-    if [ ! "${PEERNIS}" = "no" ]; then
-        if [ -n "${new_nis_domain}" ]; then
-            domainname "${new_nis_domain}"
-            save_config_file ${CONF}
-            let contents=0
-            echo '# generated by /sbin/dhclient-script' > ${CONF}
-
-            if [ -n "${new_nis_servers}" ]; then
-                for i in ${new_nis_servers} ; do
-                    echo "domain ${new_nis_domain} server ${i}" >> ${CONF}
-                    let contents=contents+1
-                done
-            else
-                echo "domain ${new_nis_domain} broadcast" >> ${CONF}
-                let contents=contents+1
-            fi
-
-            if [ ${contents} -gt 0 ]; then
-                if [ -x /etc/rc.d/init.d/ypbind ] &&
-                   [ -r /var/run/ypbind.pid ]; then
-                    service ypbind restart >/dev/null 2>&1
-                fi
-            fi
-        elif [ -n "${new_nis_servers}" ]; then
-            save_config_file ${CONF}
-            echo '# generated by /sbin/dhclient-script' > ${CONF}
-            let contents=0
-
-            for i in ${new_nis_servers} ; do
-                echo "ypserver ${i}" >> ${CONF}
-                let contents=contents+1
-            done
-
-            if [ $contents -gt 0 ]; then
-                if [ -x /etc/rc.d/init.d/ypbind ] &&
-                   [ -r /var/run/ypbind.pid ]; then
-                    service ypbind restart >/dev/null 2>&1
-                fi
-            fi
-        fi
-    fi
-}
-
-nis_restore() {
-    if [ ! "${PEERNIS}" = "no" ]; then
-        if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then
-            rm -f ${CONF}
-            mv -f ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF}
-            if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
-                service ypbind restart >/dev/null 2>&1
-            fi
-        fi
-    fi
-}
+#!/bin/bash
+#
+# nis.sh: dhclient-script plugin for NIS settings,
+#         place in /etc/dhcp/dhclient.d and 'chmod +x nis.sh' to enable
+#
+# Copyright (C) 2008 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author(s): David Cantrell <dcantrell at redhat.com>
+#
+
+CONF=/etc/yp.conf
+
+save_config_file() {
+    origfile="${1}"
+    savefile="${SAVEDIR}/${origfile##*/}.predhclient.${interface}"
+
+    if [ ! -d ${SAVEDIR} ]; then
+        mkdir -p ${SAVEDIR}
+    fi
+
+    if [ -e ${origfile} ]; then
+        mv ${origfile} ${savefile}
+    else
+        echo > ${savefile}
+    fi
+
+    restorecon ${savefile} >/dev/null 2>&1
+}
+
+nis_config() {
+    if [ ! "${PEERNIS}" = "no" ]; then
+        if [ -n "${new_nis_domain}" ]; then
+            domainname "${new_nis_domain}"
+            save_config_file ${CONF}
+            let contents=0
+            echo '# generated by /sbin/dhclient-script' > ${CONF}
+
+            if [ -n "${new_nis_servers}" ]; then
+                for i in ${new_nis_servers} ; do
+                    echo "domain ${new_nis_domain} server ${i}" >> ${CONF}
+                    let contents=contents+1
+                done
+            else
+                echo "domain ${new_nis_domain} broadcast" >> ${CONF}
+                let contents=contents+1
+            fi
+
+            if [ ${contents} -gt 0 ]; then
+                if [ -x /etc/rc.d/init.d/ypbind ] &&
+                   [ -r /var/run/ypbind.pid ]; then
+                    service ypbind restart >/dev/null 2>&1
+                fi
+            fi
+        elif [ -n "${new_nis_servers}" ]; then
+            save_config_file ${CONF}
+            echo '# generated by /sbin/dhclient-script' > ${CONF}
+            let contents=0
+
+            for i in ${new_nis_servers} ; do
+                echo "ypserver ${i}" >> ${CONF}
+                let contents=contents+1
+            done
+
+            if [ $contents -gt 0 ]; then
+                if [ -x /etc/rc.d/init.d/ypbind ] &&
+                   [ -r /var/run/ypbind.pid ]; then
+                    service ypbind restart >/dev/null 2>&1
+                fi
+            fi
+        fi
+    fi
+}
+
+nis_restore() {
+    if [ ! "${PEERNIS}" = "no" ]; then
+        if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then
+            rm -f ${CONF}
+            mv -f ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF}
+            if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
+                service ypbind restart >/dev/null 2>&1
+            fi
+        fi
+    fi
+}


Index: ypbind.spec
===================================================================
RCS file: /cvs/extras/rpms/ypbind/devel/ypbind.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- ypbind.spec	25 Feb 2009 18:17:08 -0000	1.59
+++ ypbind.spec	26 Feb 2009 14:57:09 -0000	1.60
@@ -1,7 +1,7 @@
 Summary: The NIS daemon which binds NIS clients to an NIS domain
 Name: ypbind
 Version: 1.20.4
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@@ -97,6 +97,10 @@
 %doc README NEWS
 
 %changelog
+* Thu Feb 26 2009 Vitezslav Crhonek <vcrhonek at redhat.com> - 3:1.20.4-16
+- Fix ypbind script in dos format - bash syntax errors
+  Resolves: #486722
+
 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3:1.20.4-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list