Page MenuHomeFreeBSD

bsdinstall jail: replace dialog(1) with bsddialog(1)
ClosedPublic

Authored by asiciliano on May 20 2022, 6:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 13 2024, 11:40 PM
Unknown Object (File)
Jan 2 2024, 2:02 PM
Unknown Object (File)
Dec 23 2023, 2:11 AM
Unknown Object (File)
Dec 10 2023, 7:09 PM
Unknown Object (File)
Nov 26 2023, 6:58 PM
Unknown Object (File)
Nov 17 2023, 7:54 AM
Unknown Object (File)
Oct 17 2023, 2:01 PM
Unknown Object (File)
Oct 16 2023, 6:52 AM
Subscribers

Details

Summary

Replace dialog(1) with bsddialog(1).

Test Plan

jail_test.sh:

#!/bin/sh

: ${BSDDIALOG_OK=0}

BSDINSTALL_DISTDIR=.
BSDINSTALL_DISTSITE=ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/14.0-CURRENT

fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST

: ${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 3>&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>&3)
	    for dist in $EXTRA_DISTS; do
	    	export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
	    done
    fi
fi

echo "DISTRIBUTIONS: $DISTRIBUTIONS"
echo "(remove ./MANIFEST ! )"
% ./jail_test
./MANIFEST                                            1045  B 7911 kBps    00s

  Installer
 ──────────────────────────────────────────────────────────────────────────────




        ┌────────────────────┤Distribution Select├───────────────────┐
        │ Choose optional system components to install:              │  
        │ ┌────────────────────────────────────────────────────────┐ │  
        │ │[X] lib32_dbg 32-bit compatibility libraries (Debugging)│ │  
        │ │[X] lib32     32-bit compatibility libraries            │ │  
        │ │[X] ports     Ports tree                                │ │  
        │ │[X] src       System source tree                        │ │  
        │ │[X] tests     Test suite                                │ │  
        │ └────────────────────────────────────────────────────────┘ │  
        ├────────────────────────────────────────────────────────────┤  
        │                          [  OK  ]                          │  
        └────────────────────────────────────────────────────────────┘  
                                                                        




DISTRIBUTIONS: base.txz lib32_dbg.txz lib32.txz ports.txz src.txz tests.txz
(remove ./MANIFEST ! )

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable