Moving some items out of src/sbin to src/usr.sbin
bde at zeta.org.au
Sun Jun 1 05:26:59 PDT 2003
On Sat, 31 May 2003, Gordon Tetlow wrote:
> On Sat, May 31, 2003 at 03:28:22PM -0700, Julian Elischer wrote:
> > > On Sat, May 31, 2003 at 12:38:49PM -0700, Gordon Tetlow wrote:
> > > > To cut down on the size of a dynamically-linked root, I'd like to
> > > > repo-copy the following utilities from src/sbin to src/usr.sbin:
> > > >
> > > > mount_portalfs
> > > > mount_nwfs
> > > > mount_smbfs
> > > > natd
> > > > ipnat
> > > >
> > > > Does anyone have any objections?
> > it would make it hard to mount an smbfs /usr right?
> > I think it goes against POLA to mofe mount subtypes away from where they
> > are..
> mount_smbfs is dynamically linked currently. You can't use it to mount
> /usr even if you wanted to. No POLA will be broken by moving it. And
> if you are using nwfs or portalfs for /usr, may $DEITY have pity on your
There is little point in moving the utilities for the dynamically linked
case, since they are small in that case. Just don't put their libraries
in the root partition, so that they work like mount_smbfs does now (not,
if /usr is not mounted).
mount_smbfs isn't actually dynamically linked currently:
$ file /sbin/mount_smbfs
/sbin/mount_smbfs: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.0, statically linked, stripped
The world was built with NOSHARED=yes.
This seems to be a bug in mount_smbfs/Makefile:
# Needs to be dynamically linked for optional dlopen() access to
# userland libiconv (see the -E option).
If it really needs to be dynamically linked, then NOSHARED should
be set unconditionally.
BTW, rc.ng still doesn't support nfs-mounting /usr. It attempts to use
utilities in /usr before /usr is mounted. From console.log:
May 29 20:51:15 gamplex kernel: /dev/ad0s2h: clean, 1098574 free (14 frags, 137320 blocks, 0.0% fragmentation)
May 29 20:51:15 gamplex kernel: chown: not found
May 29 20:51:15 gamplex kernel: Setting hostname: gamplex.bde.org.
May 29 20:51:15 gamplex kernel: fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
May 29 20:51:15 gamplex kernel: inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255
May 29 20:51:15 gamplex kernel: ether 00:90:27:99:02:99
May 29 20:51:15 gamplex kernel: media: Ethernet autoselect (100baseTX <full-duplex>)
May 29 20:51:15 gamplex kernel: status: active
May 29 20:51:15 gamplex kernel: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
May 29 20:51:15 gamplex kernel: inet 127.0.0.1 netmask 0xff000000
May 29 20:51:15 gamplex kernel: id: not found
More information about the freebsd-arch