Page MenuHomeFreeBSD

release/rc.local: Replace dialog with bsddialog
ClosedPublic

Authored by asiciliano on Mar 25 2022, 10:25 PM.
Tags
None
Referenced Files
F107757500: D34678.diff
Sat, Jan 18, 12:10 AM
Unknown Object (File)
Fri, Dec 27, 2:17 AM
Unknown Object (File)
Fri, Dec 20, 6:28 PM
Unknown Object (File)
Dec 13 2024, 8:33 AM
Unknown Object (File)
Oct 1 2024, 12:52 AM
Unknown Object (File)
Sep 30 2024, 7:33 AM
Unknown Object (File)
Sep 25 2024, 10:34 PM
Unknown Object (File)
Sep 25 2024, 5:32 PM
Subscribers

Details

Summary

Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Test Plan

The new component is --pause,
--textbox is used by portconfig to show pkh-help,
--yesno: is trivial.

However this script has 4 dialogs:

bsddialog --backtitle "FreeBSD Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of FreeBSD complete! Rebooting in 10 seconds" 10 30 10

┌─────────┤Complete├─────────┐
│ Installation of FreeBSD    │  
│ complete! Rebooting in 10  │  
│ seconds                    │  
│  ┌──────────────────────┐  │  
│  │           0          │  │  
│  └──────────────────────┘  │  
├────────────────────────────┤  
│          [Reboot]          │  
└────────────────────────────┘

#bsddialog --backtitle "FreeBSD Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0
bsddialog --backtitle "FreeBSD Installer" --title "Error" --textbox rc.local 0 0 (an existing file)

┌─────────────────────┤Error├────────────────────┐
│#!/bin/sh                                       │  
│# $FreeBSD$                                     │  
│                                                │  
│: ${BSDDIALOG_OK=0}                             │  
│: ${BSDDIALOG_CANCEL=1}                         │  
│: ${BSDDIALOG_HELP=2}                           │  
│: ${BSDDIALOG_EXTRA=3}                          │  
│: ${BSDDIALOG_ESC=5}                            │  
│: ${BSDDIALOG_ERROR=255}                        │  
│                                                │  
│MACHINE=`uname -m`                              │  
│                                                │  
│# resolv.conf from DHCP ends up in here, so make│  
│mkdir /tmp/bsdinstall_etc                       │  
│                                                │  
│kbdcontrol -d >/dev/null 2>&1                   │  
├────────────────────────────────────────────────┤  
│                     [EXIT]                     │  
└────────────────────────────────────────────────┘

bsddialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0

┌────────────────┤Welcome├───────────────┐
│ Welcome to FreeBSD! Would you like to  │  
│ begin an installation or use the live  │  
│ CD?                                    │  
├────────────────────────────────────────┤  
│    [Install]   [ Shell ]   [Live CD]   │  
└────────────────────────────────────────┘

bsddialog --backtitle "FreeBSD Installer" --title "Complete" --yes-label "Reboot" --no-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0

┌───────────────┤Complete├────────────────┐
│ Installation of FreeBSD complete! Would │  
│ you like to reboot into the installed   │  
│ system now?                             │  
├─────────────────────────────────────────┤  
│          [Reboot ]   [Live CD]          │  
└─────────────────────────────────────────┘

Diff Detail

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