Date: Fri, 20 Apr 2007 20:09:52 +0800 From: Eugene Grosbein <eugen@kuzbass.ru> To: Jordan Coleman <jordan@JordanColeman.com> Cc: freebsd-small@freebsd.org Subject: Re: Building NanoBSD with ports and packages Message-ID: <20070420120952.GA28426@svzserv.kemerovo.su> In-Reply-To: <14320DBA-7A3B-4CA6-BC60-D2BF8EA77C71@JordanColeman.com> References: <14320DBA-7A3B-4CA6-BC60-D2BF8EA77C71@JordanColeman.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 20, 2007 at 06:07:50AM -0400, Jordan Coleman wrote: > Can anyone suggest a way to pre-install ports in a NanoBSD system at > build time? Ideally, I'd like to be able to add a customize_cmd to > my NanoBSD configuration file so that the finished disk images can be > made to include anything in ports. > > Suggestions? Just add to your nanobsd.conf: NANO_CUSTOMIZE="/path/to/localfiles" Place packages to /path/to/Pkg subdirectory. Here comes the script "localfiles": #!/bin/sh -e # save pointer to packages, there should be $src/Pkg directory # with packages ready to install src=$(dirname `realpath $0`) pkgs="$src/Pkg" # go to Nano world cd "$NANO_WORLDDIR" # start from the beginning dirs="usr/local tmp/Pkg var/db/pkg" rm -rf $dirs mkdir $dirs trap "umount $pkgs" SIGHUP SIGINT SIGTERM mount_nullfs -o ro "$pkgs" tmp/Pkg chroot "$NANO_WORLDDIR" sh -c "cd /tmp/Pkg && pkg_add -vF *" umount "$pkgs" rmdir tmp/Pkg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070420120952.GA28426>