Re: Handling non-standard directories in tinybsd

From: Jean Milanez Melo <jmelo_at_freebsdbrasil.com.br>
Date: Tue, 24 Oct 2006 08:18:11 -0200
Jeremie Le Hen wrote:
> Hi Julian,
> 
> (Sorry for cross-posting, but I haven't been able to make my mind.)
> 
> I've created a small patch for tinybsd that allows to add files that do not
> come from the base system (I needed ${LOCALBASE}/sbin/hping).
> 
> Regards,
> 
> 
> ------------------------------------------------------------------------
> 
> Index: tinybsd
> ===================================================================
> RCS file: /home/ncvs/src/tools/tools/tinybsd/tinybsd,v
> retrieving revision 1.4
> diff -u -r1.4 tinybsd
> --- tinybsd	11 Oct 2006 21:46:53 -0000	1.4
> +++ tinybsd	24 Oct 2006 09:58:21 -0000
> _at__at_ -260,6 +260,15 _at__at_
>  	mtree -deU -f /etc/mtree/BSD.root.dist -p ${WORKDIR}
>  	mtree -deU -f /etc/mtree/BSD.usr.dist -p ${WORKDIR}/usr
>  	mtree -deU -f /etc/mtree/BSD.var.dist -p ${WORKDIR}/var
> +
> +	for file in `cat ${CURRENTDIR}/conf/${CONF}/tinybsd.basefiles | grep -v "#" | \
> +		cut -f1 -d":" | sort | uniq` ; do
> +		dir=`dirname ${file}`
> +		if [ ! -d $WORKDIR/$dir ]; then
> +			echo "Non-standard directory created: $dir."
> +			mkdir -p $WORKDIR/$dir
> +		fi
> +	done
>  }
>  
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

Maybe it's not the better way to do this. I'm thinking a way to add 
third applications on tinybsd, so when this feature is done the 
directories will be automatically created.

Thanks

Jean
Received on Tue Oct 24 2006 - 09:18:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:01 UTC