PERFORCE change 95420 for review
soc-andrew
soc-andrew at FreeBSD.org
Mon Apr 17 08:15:08 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95420
Change 95420 by soc-andrew at soc-andrew_serv on 2006/04/17 08:14:54
Create a new target to install a package on the boot media
Make the bsd shell shellscript a little easyer to work with
Affected files ...
.. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#42 edit
.. //depot/projects/soc2005/bsdinstaller/src/release/bsdinstaller/bsdinstaller_shell.sh#10 edit
Differences ...
==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#42 (text+ko) ====
@@ -826,26 +826,16 @@
@cp -Rp ${RD}/kernels/GENERIC/ ${RD}/bsdinstaller/root/boot/kernel
# Install Lua into the package root
- ( /usr/bin/fetch -ARr -o ${RD}/bsdinstaller/lua.tbz \
- ${PACKAGE_SITE}/${PACKAGE_DIR}/lua.tbz && \
- pkg_add -R -P ${RD}/bsdinstaller/root/usr/local \
- ${RD}/bsdinstaller/lua.tbz )
- rm ${RD}/bsdinstaller/lua.tbz
-
- ( /usr/bin/fetch -ARr -o ${RD}/bsdinstaller/luasocket.tbz \
- ${PACKAGE_SITE}/${PACKAGE_DIR}/luasocket.tbz && \
- pkg_add -R -P ${RD}/bsdinstaller/root/usr/local \
- ${RD}/bsdinstaller/luasocket.tbz )
- rm ${RD}/bsdinstaller/luasocket.tbz
-
- ( /usr/bin/fetch -ARr -o ${RD}/bsdinstaller/lua50-posix-5.0.tbz \
- ${PACKAGE_SITE}/${PACKAGE_DIR}/lua50-posix-5.0.tbz && \
- pkg_add -R -P ${RD}/bsdinstaller/root/usr/local \
- ${RD}/bsdinstaller/lua50-posix-5.0.tbz )
- rm ${RD}/bsdinstaller/lua50-posix-5.0.tbz
-
- # Reset the library directories
- ldconfig /lib /usr/lib /usr/lib/compat /usr/local/lib
+ @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua \
+ ROOT=${RD}/bsdinstaller/root
+ @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-compat51 \
+ ROOT=${RD}/bsdinstaller/root
+ @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=luasocket \
+ ROOT=${RD}/bsdinstaller/root
+ @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-posix \
+ ROOT=${RD}/bsdinstaller/root
+ @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-pty \
+ ROOT=${RD}/bsdinstaller/root
@touch ${RD}/bsdinstaller/root/etc/fstab
@echo "sendmail_enable=\"NONE\"" > ${RD}/bsdinstaller/root/etc/rc.conf
@@ -1303,6 +1293,24 @@
done \
fi
+# Installs a package on the install media
+# ROOT is where to install it to
+# PACKAGE is the package name
+installPackage:
+.if !defined(ROOT)
+ @echo "ROOT undefined in installPackage" && exit 1
+.endif
+.if !defined(PACKAGE)
+ @echo "PACKAGE undefined in installPackage" && exit 1
+.endif
+ rm ${RD}/${PACKAGE}.tbz
+ ( /usr/bin/fetch -ARr -o ${RD}/${PACKAGE}.tbz \
+ ${PACKAGE_SITE}/${PACKAGE_DIR}/${PACKAGE}.tbz && \
+ pkg_add -Rf -P ${ROOT}/usr/local \
+ ${RD}/${PACKAGE}.tbz )
+ rm ${RD}/${PACKAGE}.tbz
+ ldconfig /lib /usr/lib /usr/lib/compat /usr/local/lib
+
#
# --==## Build a floppy set for a splitfs file ##==--
#
==== //depot/projects/soc2005/bsdinstaller/src/release/bsdinstaller/bsdinstaller_shell.sh#10 (text+ko) ====
@@ -13,8 +13,14 @@
/usr/sbin/bsd_installer_ncurses
elif [ ${TTY} = "/dev/ttyv1" ]
then
- LD_PRELOAD="/usr/local/lib/liblua.so;/usr/local/lib/liblualib.so;/usr/lib/libm.so" LUA_PATH="/usr/local/share/lua/5.0/?.lua;/usr/lib/lua/?.lua;/usr/libexec/bsdinstaller/lib/?.lua" LUA_CPATH="/usr/local/lib/lua/5.0/?.so;/usr/lib/lua/?.so" LUA_SOPATH=/usr/local/lib/lua/5.0/ lua -lcompat-5.1 /usr/libexec/bsdinstaller/main.lua /usr/libexec/bsdinstaller/conf/BSDInstaller.lua /usr/libexec/bsdinstaller/conf/FreeBSD.lua dir.root=/ booted_from_install_media=true
- #/usr/sbin/bsd_installer_be
+ export LD_PRELOAD="/usr/local/lib/liblua.so;/usr/local/lib/liblualib.so;/usr/lib/libm.so"
+ export LUA_PATH="/usr/local/share/lua/5.0/?.lua;/usr/lib/lua/?.lua;/usr/libexec/bsdinstaller/lib/?.lua"
+ export LUA_CPATH="/usr/local/lib/lua/5.0/?.so;/usr/lib/lua/?.so"
+ export LUA_SOPATH=/usr/local/lib/lua/5.0/
+ lua -lcompat-5.1 /usr/libexec/bsdinstaller/main.lua \
+ /usr/libexec/bsdinstaller/conf/BSDInstaller.lua \
+ /usr/libexec/bsdinstaller/conf/FreeBSD.lua dir.root=/ \
+ booted_from_install_media=true
if [ $? -eq 5 ]
then
# The backend returned the reboot value
More information about the p4-projects
mailing list