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)
Sun, Nov 10, 9:12 PM
Unknown Object (File)
Sep 24 2024, 5:48 PM
Unknown Object (File)
Sep 24 2024, 11:49 AM
Unknown Object (File)
Sep 24 2024, 3:27 AM
Unknown Object (File)
Sep 17 2024, 10:31 AM
Unknown Object (File)
Sep 16 2024, 11:22 PM
Unknown Object (File)
Sep 16 2024, 7:46 AM
Unknown Object (File)
Sep 9 2024, 6:33 PM
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