Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144456245
D49823.id153722.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D49823.id153722.diff
View Options
diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail
--- a/usr.sbin/bsdinstall/scripts/jail
+++ b/usr.sbin/bsdinstall/scripts/jail
@@ -53,6 +53,63 @@
fi
}
+non_pkgbase() {
+ test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR
+
+ if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then
+ exec 5>&1
+ BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5)
+ MIRROR_BUTTON=$?
+ exec 5>&-
+ test $MIRROR_BUTTON -eq 0 || error "No mirror selected"
+ export BSDINSTALL_DISTSITE
+ fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST"
+ fi
+
+ : ${DISTRIBUTIONS="base.txz"}; export DISTRIBUTIONS
+ if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
+ DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base`
+
+ if [ ! "$nonInteractive" == "YES" ]
+ then
+ exec 5>&1
+ EXTRA_DISTS=$(echo $DISTMENU | xargs -o bsddialog \
+ --backtitle "$OSNAME Installer" \
+ --title "Distribution Select" --no-cancel --separate-output \
+ --checklist "Choose optional system components to install:" \
+ 0 0 0 \
+ 2>&1 1>&5)
+ for dist in $EXTRA_DISTS; do
+ export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
+ done
+ fi
+ fi
+
+ FETCH_DISTRIBUTIONS=""
+ for dist in $DISTRIBUTIONS; do
+ if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then
+ FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist"
+ fi
+ done
+ FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space
+
+ if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then
+ exec 5>&1
+ BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5)
+ MIRROR_BUTTON=$?
+ exec 5>&-
+ test $MIRROR_BUTTON -eq 0 || error "No mirror selected"
+ export BSDINSTALL_DISTSITE
+ fi
+
+ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
+ bsdinstall distfetch || error "Failed to fetch distribution"
+ fi
+
+ bsdinstall checksum || error "Distribution checksum failed"
+ bsdinstall distextract || error "Distribution extract failed"
+}
+
if [ -z "$1" ]; then
error "Directory can not be empty\n\nUsage:\nbsdinstall jail directory"
fi
@@ -73,61 +130,19 @@
. $TMPDIR/bsdinstall-installscript-preamble
fi
-test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR
-
-if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then
- exec 5>&1
- BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5)
- MIRROR_BUTTON=$?
- exec 5>&-
- test $MIRROR_BUTTON -eq 0 || error "No mirror selected"
- export BSDINSTALL_DISTSITE
- fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST"
-fi
-
-: ${DISTRIBUTIONS="base.txz"}; export DISTRIBUTIONS
-if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
- DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base`
-
- if [ ! "$nonInteractive" == "YES" ]
- then
- exec 5>&1
- EXTRA_DISTS=$(echo $DISTMENU | xargs -o bsddialog \
- --backtitle "$OSNAME Installer" \
- --title "Distribution Select" --no-cancel --separate-output \
- --checklist "Choose optional system components to install:" \
- 0 0 0 \
- 2>&1 1>&5)
- for dist in $EXTRA_DISTS; do
- export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
- done
- fi
-fi
-
-FETCH_DISTRIBUTIONS=""
-for dist in $DISTRIBUTIONS; do
- if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then
- FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist"
+if [ "$nonInteractive" == "YES" ]; then
+ non_pkgbase
+else
+ bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \
+ --yes-label "Standard" --no-label "PkgBase (Experimental)" --yesno \
+ "Would you like to perform a standard installation (base.txz, etc.) or install a packaged base system (experimental)?" 0 0
+ if [ $? -eq 1 ]; then
+ bsdinstall pkgbase --no-kernel
+ else
+ non_pkgbase
fi
-done
-FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space
-
-if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then
- exec 5>&1
- BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5)
- MIRROR_BUTTON=$?
- exec 5>&-
- test $MIRROR_BUTTON -eq 0 || error "No mirror selected"
- export BSDINSTALL_DISTSITE
-fi
-
-if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
- bsdinstall distfetch || error "Failed to fetch distribution"
fi
-bsdinstall checksum || error "Distribution checksum failed"
-bsdinstall distextract || error "Distribution extract failed"
-
if [ ! "$nonInteractive" == "YES" ]
then
bsdinstall rootpass || error "Could not set root password"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 1:11 PM (42 m, 56 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28582268
Default Alt Text
D49823.id153722.diff (4 KB)
Attached To
Mode
D49823: bsdinstall: add pkgbase prompt to jail script
Attached
Detach File
Event Timeline
Log In to Comment