aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/nis/files
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-01-06 00:06:28 -0800
committerKhem Raj <raj.khem@gmail.com>2013-01-08 09:31:44 -0800
commit5d56edf7a7dc53f92e954fbf92238409c1e183e8 (patch)
treef12fa3dfb2d530026f44fa13e9133f4321c7d789 /meta-networking/recipes-support/nis/files
parent4c735f36f64476320c130ffe14a5c831f65b9c42 (diff)
downloadmeta-openembedded-contrib-5d56edf7a7dc53f92e954fbf92238409c1e183e8.tar.gz
nis: Import recipes from OE classic
Update to latest versions while at it Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/nis/files')
-rw-r--r--meta-networking/recipes-support/nis/files/libdl.patch12
-rw-r--r--meta-networking/recipes-support/nis/files/no-selinux.patch16
-rw-r--r--meta-networking/recipes-support/nis/files/ypbind-yocto.init99
3 files changed, 127 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/nis/files/libdl.patch b/meta-networking/recipes-support/nis/files/libdl.patch
new file mode 100644
index 0000000000..605af319f9
--- /dev/null
+++ b/meta-networking/recipes-support/nis/files/libdl.patch
@@ -0,0 +1,12 @@
+--- pwdutils-2.6/configure.in.orig 2005-04-19 20:22:36.603052192 -0700
++++ pwdutils-2.6/configure.in 2005-04-19 21:09:45.308023672 -0700
+@@ -178,6 +178,9 @@
+ AC_CHECK_LIB(ldap, main, LDAP_LIBS="-lldap $LDAP_LIBS" found_ldap_lib=yes,,$LDAP_LIBS)
+ fi
+
++ dnl this always needs dl
++ AC_CHECK_LIB(dl, dlopen, LDAP_LIBS="$LDAP_LIBS -ldl")
++
+ if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape5 \); then
+ AC_CHECK_LIB(ldap50, main, LDAP_LIBS="-lldap50 -lssldap50 -lssl3 -lnss3 -lnspr4 -lprldap50 -lplc4 -lplds4" found_ldap_lib=yes need_pthread=true,, -lpthread)
+ fi
diff --git a/meta-networking/recipes-support/nis/files/no-selinux.patch b/meta-networking/recipes-support/nis/files/no-selinux.patch
new file mode 100644
index 0000000000..71da3e3931
--- /dev/null
+++ b/meta-networking/recipes-support/nis/files/no-selinux.patch
@@ -0,0 +1,16 @@
+--- pwdutils-2.6/lib/copy_xattr.c.orig 2005-04-16 17:15:52.916660880 -0700
++++ pwdutils-2.6/lib/copy_xattr.c 2005-04-16 17:18:10.345768480 -0700
+@@ -127,8 +127,11 @@
+
+ if (lsetxattr (to, name, value, size, 0) != 0)
+ {
+- if (strcmp (name, "security.selinux") == 0 &&
+- is_selinux_enabled() == 0)
++ if (strcmp (name, "security.selinux") == 0
++#if defined(WITH_SELINUX)
++ && is_selinux_enabled() == 0
++#endif
++ )
+ fprintf (stderr,
+ _("SELinux not enabled, ignore attribute %s for `%s'.\n"),
+ name, to);
diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind-yocto.init
new file mode 100644
index 0000000000..5f50a530e7
--- /dev/null
+++ b/meta-networking/recipes-support/nis/files/ypbind-yocto.init
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (c) 2004 Author: Thorsten Kukuk <kukuk@suse.de>
+#
+# /etc/init.d/ypbind
+#
+# and symbolic its link
+#
+# /usr/sbin/rcypbind
+#
+# System startup script for the ypbind daemon
+#
+### BEGIN INIT INFO
+# Provides: ypbind
+# Required-Start: $remote_fs $portmap
+# Should-Start: ypserv slpd
+# Required-Stop: portmap
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Start ypbind (necessary for a NIS client)
+# Description: ypbind finds the server for NIS domains and maintains
+# the NIS binding information.
+### END INIT INFO
+
+YPBIND_BIN=/usr/sbin/ypbind
+pidfile=/var/run/ypbind.pid
+
+[ -f /etc/default/ypbind ] && . /etc/default/ypbind
+
+case "$1" in
+ start)
+ echo -n "Starting ypbind"
+ ## If the domainname is not set, skip starting of ypbind
+ ## and return with "program not configured"
+ /bin/ypdomainname &> /dev/null
+ if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
+ if [ -f /etc/defaultdomain ]; then
+ XDOMAINNAME=`cat /etc/defaultdomain`
+ /bin/ypdomainname "$XDOMAINNAME"
+ fi
+ /bin/ypdomainname &> /dev/null
+ if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
+ # Tell the user this has skipped
+ echo -n " . . . . . . . . . . No domainname set"
+ # service is not configured
+ exit 1
+ fi
+ fi
+
+ ## If we don't have a /etc/yp.conf file, skip starting of
+ ## ypbind and return with "program not configured"
+ ## if you add the -broadcast Option later, comment this out.
+ if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then
+ # Tell the user this has skipped
+ echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}"
+ # service is not configured
+ exit 1
+ fi
+
+ # evaluate the OPTIONS for ypbind-mt
+ OPTIONS=""
+ test "$YPBIND_LOCAL_ONLY" = "yes" && OPTIONS="-local-only $OPTIONS"
+ test "$YPBIND_BROADCAST" = "yes" && OPTIONS="-broadcast $OPTIONS"
+ test "$YPBIND_BROKEN_SERVER" = "yes" && OPTIONS="-broken-server $OPTIONS"
+
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $YPBIND_BIN -- $YPBIND_OPTIONS $OPTIONS
+ if [ $? -eq 0 ]; then
+ notfound=1
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+ ypwhich &>/dev/null && { notfound=0 ; break; };
+ echo -n " ."
+ sleep 1;
+ done
+ if [ $notfound -eq 1 ]; then
+ echo -n " ${warn}No NIS server found${norm}";
+ fi
+ else
+ exit 1
+ fi
+ ;;
+ stop)
+ echo -n "Shutting down ypbind"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ # Remove static data, else glibc will continue to use NIS
+ rm -f /var/yp/binding/* /var/run/ypbind.pid
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ reload | force-reload)
+ echo -n "Reload service ypbind"
+ start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ exit 1
+ ;;
+esac