change order of commands in usr.sbin/jail/jail.c

Robert Schulze rs at bytecamp.net
Tue Feb 25 15:58:00 UTC 2014


Dear readers,

I would like to propose a change to the order of commands that get run 
on jail startup and stop.
The current running order on start is (shortened):

...
IP_MOUNT,
IP__MOUNT_FROM_FSTAB,
IP_MOUNT_DEVFS,
IP_MOUNT_FDESCFS,
IP_EXEC_PRESTART,
...

on stop:
...
IP_EXEC_POSTSTOP,
IP_MOUNT_FDESCFS,
IP_MOUNT_DEVFS,
IP__MOUNT_FROM_FSTAB,
IP_MOUNT,
...

Wouldn't it be closer to the docs when IP_EXEC_PRESTART would be 
executed before IP_MOUNT on startup and IP_EXEC_POSTSTOP after IP_MOUNT 
on stop?

I have been bitten by this because I want to create md-devices and mount 
them as jail's root before startup (via exec.prestart), but jail(8) 
bails out trying to mount devfs into the non-existing jail filesystem, 
just because MOUNT_DEVFS is called before IP_EXEC_PRESTART.

with kind regards,
Robert Schulze

-- 
/7\ bytecamp GmbH
Geschwister-Scholl-Str. 10, 14776 Brandenburg a.d. Havel
HRB15752, Amtsgericht Potsdam, Geschaeftsfuehrer:
Bjoern Barnekow, Frank Rosenbaum, Sirko Zidlewitz
tel +49 3381 79637-0 werktags 10-12,13-17 Uhr, fax +49 3381 79637-20
mail rs at bytecamp.net, web http://bytecamp.net/


More information about the freebsd-stable mailing list