NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: automatic installation of NetBSD



On Sat, Jun 06, 2009 at 05:50:29PM -0400, Martin S. Weber wrote:
> I agree about the EOF. But one more:
> 
> On Sat, Jun 06, 2009 at 11:38:08PM +0200, Rhialto wrote:
> > (...)
> > chpass -s /bin/sh root
> > if [ $? != 0 ]; then echo "/targetroot/netbsd does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/etc does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/etc/fstab does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/sbin/init does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/bin/sh does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/etc/rc does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/etc/rc.subr does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/etc/rc.conf does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/dev does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/dev/console does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/etc/fstab does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/sbin/fsck does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/sbin/fsck_ffs does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/sbin/mount does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/sbin/mount_ffs does not exist!"; fi
> > if [ $? != 0 ]; then echo "/targetroot/sbin/mount_nfs does not exist!"; fi
> 
> Huh ??

In short, this comes from sysinst using stat(2) instead of stat(1) together
with script(ing?)_fprintf/run_command etc. so it does the mode check of various
files in C and then logs error code checking for sh. This might be fixed by
adding stat(1) and/or test(1) to ramdisk-big (which miniroot.kmod is based on
if I'm not mistaken), and sysinst use stat(1) / test(1) to perform the checks.
I guess I'll create a PR for it, just need to do some more digging.

-Martin

(cf. distrib/utils/sysinst/target.c 483/484 and definition of file_mode_match,
in distrib/utils/sysinst/util.c:212+)


Home | Main Index | Thread Index | Old Index