File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 441 . [ Requirements] ( #requirements )
551 . [ Provision Instructions] ( #provision-instructions )
661 . [ Build Instructions] ( #build-instructions )
7+ 1 . [ More Examples] ( #more-examples )
781 . [ Acknowledgement] ( #acknowledgement )
89
910## About
@@ -35,7 +36,15 @@ Use `build.sh` to create your own images or to include a modified version of `rc
3536```
3637# git clone https://github.com/fraenki/freebsd-foreman.git
3738# cd freebsd-foreman
38- # ./build.sh -r 13.1
39+ # ./build.sh -r 14.2
40+ ```
41+
42+ ## More Examples
43+
44+ To use a local copy of the mfsbsd image instead of having the script download it, just specify the filename:
45+
46+ ```
47+ ./build.sh -r 14.3 -f downloads/mfsbsd-14.3-RELEASE-p3-amd64.img
3948```
4049
4150## Acknowledgement
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ IMAGE_MD_NO=99
66IMAGE_MOUNT_DIR=' /mnt/loop'
77ROOT_MD_NO=100
88ROOT_MOUNT_DIR=' /mnt/mfsroot'
9+ MFSBSD_FILENAME=' '
910
1011cleanup () {
1112 cd $TMP_DIR
2021# handle arguments
2122while [ ${# } -gt 0 ]; do
2223 case " ${1} " in
24+ -f)
25+ if ! test -e ${2} ; then
26+ echo " Specified mfsBSD file not found: ${2} "
27+ exit 1
28+ fi
29+ MFSBSD_FILENAME=$2
30+ shift
31+ ;;
2332 -r)
2433 if ! echo ${2} | grep -qE ' ^[0-9]+\.[0-9]+$' ; then
2534 echo " Invalid FreeBSD release specified"
@@ -65,9 +74,14 @@ mkdir -p $TMP_DIR
6574cd $TMP_DIR
6675
6776# download mfsbsd image
68- if ! fetch https://mfsbsd.vx.sk/files/images/${REL_MAJOR} /amd64/${MFSBSD_IMAGE} ; then
69- echo " Failed to download mfsbsd image"
70- exit 1
77+ if [ -z " ${MFSBSD_FILENAME} " ]; then
78+ if ! fetch https://mfsbsd.vx.sk/files/images/${REL_MAJOR} /amd64/${MFSBSD_IMAGE} ; then
79+ echo " Failed to download mfsbsd image"
80+ exit 1
81+ fi
82+ else
83+ # use specified file instead
84+ MFSBSD_IMAGE=$MFSBSD_FILENAME
7185fi
7286
7387# mount mfsbsd disk image
You can’t perform that action at this time.
0 commit comments