On Fri, Jan 27, 2012 at 01:54:34PM -0800, Danek Duvall wrote: > Mike Gerdts wrote: > > > > https://cr.opensolaris.org/action/browse/pkg/dduvall/salvage-special/ > > > > I think bad things happen when running in a zone: > > > > #! /usr/bin/python2.6 > > > > import os > > > > st = os.stat("/dev/null") > > os.mknod("/var/tmp/null", st.st_mode, st.st_dev) > > > > print "OK" > > > > But that gets a traceback: > > > > # /tmp/t > > Traceback (most recent call last): > > File "/tmp/t", line 6, in <module> > > os.mknod("/var/tmp/null", st.st_mode, st.st_dev) > > OSError: [Errno 1] Not owner > > <facepalm> > > I assumed that Claudia's test meant that the fix worked for the particular > situation. I tested in a GZ, though, not an NGZ. > > In an NGZ, should I simply attempt the mknod, and if it fails on EPERM, let > it go by? I'm not sure how that should work with the testcase, since then > we can't even test in a zone. > > Thoughts? >
sorry i didn't reply to this earlier. in general, i think that we probably should not bother to salvage device nodes. if at all possible, device nodes should really be contained to /dev and /devices. the reason is that there's no guarantee that a static device node that was salvaged will continue to point to the "right" driver/device. (which may no longer exist on the system.) after driver removals and additions, a static salvaged device node could be pointing to some random driver/device. ed _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
