Re: Building NanoBSD with ports and packages
Eugene Grosbein <[email protected]> Fri, 20 Apr 2007 20:09:52 +0800
| Newsgroups | gmane.os.freebsd.devel.small |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-small To unsubscribe, send any mail to "[email protected]"