Bug 2329 - relying on /usr being local
Summary: relying on /usr being local
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: ypserv
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-04-22 20:03 UTC by darrell
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-04-22 21:36:23 UTC

Attachments (Terms of Use)

Description darrell 1999-04-22 20:03:32 UTC
you should run anything before init.d/netfs that depends
on /usr being local, for instance ypbind and ypserv which
are both kept in /usr/sbin.  they should be relocated
to /sbin (these are the two examples I noticed)

there's a very real possibility that /usr is remotely
mounted, and you should *not* depend on it being there

this is a problem in all releases I've seen, not just

Comment 1 darrell 1999-04-22 21:05:59 UTC
suggested spec file for ypserv, for example:

Summary: The NIS (Network Information Service) server.
Url: http://www-vt.uni-paderborn.de/~kukuk/linux/nis.html
Name: ypserv
Release: 2
Copyright: GNU
Group: System Environment/Daemons
Source1: ypserv-ypserv.init
Source2: ypserv-yppasswdd.init
Requires: portmap tcp_wrappers
Prereq: /sbin/chkconfig
Buildroot: /var/tmp/ypserv-root/
Patch0: ypserv-
Patch1: ypserv-
Obsoletes: yppasswd

The Network Information Service (NIS) is a system which provides
information (login names, passwords, home directories, group
to all of the machines on a network.  NIS can enable users to login on
any machine on the network, as long as the machine has the NIS client
programs running and the user's password is recorded in the NIS passwd
database.  NIS was formerly known as Sun Yellow Pages (YP).

This package provides the NIS server, which will need to be running on
your network.  NIS clients do not need to be running the server.

Install ypserv if you need an NIS server for your network.  You'll
need to install the yp-tools and ypbind packages onto any NIS client

%setup -q
%patch0 -p1
%patch1 -p1

cp etc/README etc/README.etc
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --exec-prefix=/
--libdir=/usr/lib/  \
        --libexecdir=/usr/lib/yp --enable-tcp-wrapper --enable-fqdn

#make install prefix=$RPM_BUILD_ROOT/usr
#     libexecdir=$RPM_BUILD_ROOT/usr/lib/yp
make install ROOT=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m644 etc/ypserv.conf $RPM_BUILD_ROOT/etc
install -m755 $RPM_SOURCE_DIR/ypserv-ypserv.init
install -m755 $RPM_SOURCE_DIR/ypserv-yppasswdd.init


/sbin/chkconfig --add ypserv
/sbin/chkconfig --add yppasswdd

%triggerpostun -- ypserv <= ypserv-1.3.0-2
/sbin/chkconfig --add ypserv

%trigerpostun -- yppasswd
/sbin/chkconfig --add yppasswdd

if [ $1 = 0 ]; then
        /sbin/chkconfig --del ypserv
        /sbin/chkconfig --del yppasswdd

%doc etc/ypserv.conf etc/securenets etc/README.etc
%config /etc/ypserv.conf
%config /var/yp/*
%dir /var/yp
%config /etc/rc.d/init.d/*

* Thu Apr 22 1999 Darrell Fuhriman <darrell>
- relocated binaries to /sbin
- make install line changed to use ROOT=$RPM_BUILD_ROOT

* Fri Mar 26 1999 Cristian Gafton <gafton>
- version

* Sun Mar 21 1999 Cristian Gafton <gafton>
- auto rebuild in the new build environment (release 4)

* Mon Feb  8 1999 Bill Nottingham <notting>
- move to start before ypbind

* Thu Dec 17 1998 Cristian Gafton <gafton>
- build for glibc 2.1
- upgraded to 1.3.5

* Tue Aug  4 1998 Jeff Johnson <jbj>
- yppasswd.init: lock file must have same name as init.d script, not

* Sat Jul 11 1998 Cristian Gafton <gafton>
- upgraded to 1.3.4
- fixed the fubared Makefile
- link against gdbm instead of ndbm (it seems to work better)

* Sat May 02 1998 Cristian Gafton <gafton>
- upgraded to 1.3.1
- enhanced init scripts

* Fri May 01 1998 Jeff Johnson <jbj>
- added triggerpostun
- Use libdb fro dbp_*().

* Fri Apr 24 1998 Prospector System <bugs>
- translations modified for de, fr, tr

* Mon Apr 13 1998 Cristian Gafton <gafton>
- updated to 1.3.0

* Wed Dec 03 1997 Cristian Gafton <gafton>
- updated to 1.2.5
- added buildroot; updated spec file
- added yppasswdd init file

* Tue Nov 04 1997 Erik Troan <ewt>
- init script shouldn't set the domain name

* Tue Oct 14 1997 Erik Troan <ewt>
- supports chkconfig
- updated initscript for status and restart
- turned off in all runlevels, by default
- removed postinstall script which didn't do anything

* Thu Oct 09 1997 Erik Troan <ewt>
- added patch to build against later glibc

* Mon Jul 21 1997 Erik Troan <ewt>
- built against glibc

* Wed Apr 23 1997 Erik Troan <ewt>
- updated to 1.1.7.

* Fri Mar 14 1997 Erik Troan <ewt>
- Updated to ypserv 1.1.5, ported to Alpha (glibc).

* Fri Mar 07 1997 Erik Troan <ewt>
- Removed -pedantic which confuses the SPARC :-(

Comment 2 Bill Nottingham 1999-04-22 21:33:59 UTC
ypbind *is* in /sbin.
ypserv & apmd may need fixed though.

Comment 3 Cristian Gafton 1999-04-22 21:36:59 UTC
Starting ypserv on a NIS *server* without having /usr mounted makes
little or no sense

Note You need to log in before you can comment on or make changes to this bug.