#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "Select pkgs from base(Plamo Linux Base system)"   --checklist "Select packages to install from base series. Use cursor up/down to select the package, mark(*) by space key. Push Enter to start install." 24 72 15 "aaa_base" "Basic Linux file system package" "on" \
"acl" "ACL tool" "on" \
"attr" "attr control tool" "on" \
"bash" "GNU bash" "on" \
"btrfs_progs" "Btrfs utilities" "on" \
"bzip2" "bzip2" "on" \
"coreutils" "GNU coreutils" "on" \
"cracklib" "cracklib" "on" \
"db" "Oracle Berkeley DB" "on" \
"dbus" "D-BUS, An IPC Library" "on" \
"dcron" "Dillon cron" "on" \
"dhcp" "ISC DHCP" "on" \
"dialog" "Dialogbox tool for CUI" "on" \
"dosfstools" "dosfstools" "on" \
"dump" "dump" "on" \
"e2fsprogs" "ext2/ext3 fs utiles" "on" \
"ed" "ed" "on" \
"efibootmgr" "EFI boot manager" "on" \
"efivar" "EFI variables editor" "on" \
"elfutils" "ELF format utility" "on" \
"etc" "configuration files for /etc directory" "on" \
"eudev" "Device management tool eudev" "on" \
"expat" "XML parsing library expat" "on" \
"file" "file" "on" \
"findutils" "GNU find utility" "on" \
"gawk" "gawk(GNU AWK)" "on" \
"glibc" "GNU C library" "on" \
"gmp" "GNU Multi Precision library" "on" \
"gptfdisk" "fdisk for GPT HDD" "on" \
"grep" "GNU grep" "on" \
"groff" "groff with JP patch" "on" \
"grub" "GRUB : GRand Unified Boot loader" "on" \
"gzip" "GNU zip compression utilities." "on" \
"iproute2" "Advanced Networking Tools iproute2" "on" \
"iputils" "network commands, iputils" "on" \
"iwd" "iwd (iNet wireless daemon) is a wireless daemon for Linux" "on" \
"kbd" "kbd" "on" \
"kernel_260904" "Linux kernel 6.x" "on" \
"kmod" "kmod" "on" \
"less" "less" "on" \
"lfs_bootscripts" "lfs_bootscripts" "on" \
"libaio" "Linux-native async I/O library " "on" \
"libcap" "Libcap - Library to allow POSIX 1e capabilities" "on" \
"libestr" "libestr strings manipulation library" "on" \
"libfastjson" "another JSON library, libfastjson" "on" \
"libgcc" "GCC basic libraries" "on" \
"libgcrypt" "GNU encript library, libgcrypt" "on" \
"libidn2" "International Domain Name library" "on" \
"libnl" "Convenience library for netlink sockets" "on" \
"libpsl" "Library for public suffix list" "on" \
"libpwquality" "Library for password quality checking and generating random passwords" "on" \
"libtirpc" "libtirpc for TI-RPC" "on" \
"libunistring" "Library for manipulating Unicode" "on" \
"libxcrypt" "xcrypt library" "on" \
"linux_firmware" "e_title" "on" \
"linux_pam" "Linux PAM" "on" \
"logrotate" "logroate" "on" \
"lsb_release" "version check tool" "on" \
"lvm2" "lvm2" "on" \
"lz4" "LZ4 compression library" "on" \
"lzo" "LZO compression library" "on" \
"microcode_intel" "CPU microcode for intel" "on" \
"mpfr" "GNU MPFR library" "on" \
"ncurses" "ncurses  libraries" "on" \
"net_inst" "Plamo Linux Net inst tool" "on" \
"net_tools" "network commands" "on" \
"netconfig7" "Network config script for Plamo-8.x" "on" \
"openssl" "OpenSSL" "on" \
"os_prober" "OS prober" "on" \
"pciutils" "pciutils" "on" \
"pcre" "pcre" "on" \
"pkgtools8" "pkgtools for Plamo Linux package management" "on" \
"pm_utils" "Power management utilities" "on" \
"popt" "popt command option parse library" "on" \
"procps_ng" "procps" "on" \
"psmisc" "psmisc, tools using proc fs" "on" \
"readline" "library for command line editing" "on" \
"rng_tools" "random number generation utility" "on" \
"rsyslog" "daemon for system log" "on" \
"sed" "GNU sed" "on" \
"shadow" "Shadow password program" "on" \
"sudo" "sudo" "on" \
"sysvinit" "SysVinit" "on" \
"tar" "GNU tar" "on" \
"timezone" "zoneinfo-2003e + configuration commands" "on" \
"util_linux" "Utils for Linux" "on" \
"vim" "vim editor" "on" \
"wget" "wget" "on" \
"which" "which" "on" \
"wireless_regdb" "wireless regional DB" "on" \
"wpa_supplicant" "e_title" "on" \
"xz" "XZ compression tool" "on" \
"zlib" "zlib" "on" \
"zstd" "zstd data compression tool" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in aaa_base acl attr bash btrfs_progs bzip2 coreutils cracklib db dbus dcron dhcp dialog dosfstools dump e2fsprogs ed efibootmgr efivar elfutils etc eudev expat file findutils gawk glibc gmp gptfdisk grep groff grub gzip iproute2 iputils iwd kbd kernel_260904 kmod less lfs_bootscripts libaio libcap libestr libfastjson libgcc libgcrypt libidn2 libnl libpsl libpwquality libtirpc libunistring libxcrypt linux_firmware linux_pam logrotate lsb_release lvm2 lz4 lzo microcode_intel mpfr ncurses net_inst net_tools netconfig7 openssl os_prober pciutils pcre pkgtools8 pm_utils popt procps_ng psmisc readline rng_tools rsyslog sed shadow sudo sysvinit tar timezone util_linux vim wget which wireless_regdb wpa_supplicant xz zlib zstd  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in aaa_base acl attr bash btrfs_progs bzip2 coreutils cracklib db dbus dcron dhcp dialog dosfstools dump e2fsprogs ed efibootmgr efivar elfutils etc eudev expat file findutils gawk glibc gmp gptfdisk grep groff grub gzip iproute2 iputils iwd kbd kernel_260904 kmod less lfs_bootscripts libaio libcap libestr libfastjson libgcc libgcrypt libidn2 libnl libpsl libpwquality libtirpc libunistring libxcrypt linux_firmware linux_pam logrotate lsb_release lvm2 lz4 lzo microcode_intel mpfr ncurses net_inst net_tools netconfig7 openssl os_prober pciutils pcre pkgtools8 pm_utils popt procps_ng psmisc readline rng_tools rsyslog sed shadow sudo sysvinit tar timezone util_linux vim wget which wireless_regdb wpa_supplicant xz zlib zstd ; do
    if grep "$PACKAGE" /tmp/SeTpkgs 1> /dev/null 2> /dev/null ; then
        echo "$PACKAGE: ADD" >> /tmp/SeTnewtag
    else echo "$PACKAGE: SKP" >> /tmp/SeTnewtag
    fi
done
rm -f /tmp/SeTpkgs

