Compare commits

...

22 commits

Author SHA1 Message Date
Tobias Powalowski
349939ed0b unify usage 2024-08-01 11:46:18 +02:00
Tobias Powalowski
cf757a2310 unify usage 2024-08-01 11:41:51 +02:00
Tobias Powalowski
cd59c0c882 update usage 2024-08-01 11:06:19 +02:00
Tobias Powalowski
9ecebadf99 add usage to cpio 2024-08-01 10:47:12 +02:00
Tobias Powalowski
6a580c30db add usage to cpio 2024-08-01 10:45:08 +02:00
Tobias Powalowski
4b96880c18 remove : 2024-08-01 10:30:36 +02:00
Tobias Powalowski
6e1e13738e add parameter and update usage 2024-08-01 10:27:47 +02:00
Tobias Powalowski
772934b9ba add name to script 2024-08-01 10:17:36 +02:00
Tobias Powalowski
321fa94f94 update usage 2024-08-01 10:16:18 +02:00
Tobias Powalowski
eee07ab88c update comment 2024-08-01 10:13:16 +02:00
Tobias Powalowski
ef721adddc update usage 2024-08-01 10:11:26 +02:00
Tobias Powalowski
7b9eb9ad8f update usage 2024-08-01 10:09:36 +02:00
Tobias Powalowski
8d1ed83246 add license 2024-08-01 10:06:03 +02:00
Tobias Powalowski
80e359ffd0 update usage message 2024-08-01 10:04:43 +02:00
Tobias Powalowski
a6b34c1d10 add /var/lib/systemd and /var/run to exclude directories, update usage text 2024-08-01 09:59:56 +02:00
Tobias Powalowski
6f6ebf7899 update headline 2024-08-01 09:40:31 +02:00
Tobias Powalowski
2628eca9ec update headline 2024-08-01 09:39:51 +02:00
Tobias Powalowski
f1f44a0111 uncapitalize headline 2024-08-01 09:36:50 +02:00
Tobias Powalowski
3e4975d131 add missing space 2024-08-01 09:23:09 +02:00
Tobias Powalowski
789ed34d4a update ARCHBOOT 2024-08-01 09:15:22 +02:00
Tobias Powalowski
851e0ab643 update CHANGELOG 2024-08-01 09:12:04 +02:00
Tobias Powalowski
8c655d3eb6 update quickinst usage 2024-08-01 07:54:05 +02:00
17 changed files with 96 additions and 92 deletions

View file

@ -1,5 +1,8 @@
On the road to 2024.08:
---
quickinst:
- updated usage information
---
Highlights 2024.07:
- kernel 6.10.x
- OpenSSH 9.8

View file

@ -3,12 +3,12 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_usage () {
echo "Check on missing binaries in archboot environment"
echo "-------------------------------------------------"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check on missing binaries\e[m"
echo "------------------------------------"
echo "This will check binaries from package, if they exist"
echo "and report missing to binary.log"
echo ""
echo "usage: ${_BASENAME} <package>"
echo -e "Usage: \e[1m\e${_BASENAME} <package>\e[m"
exit 0
}
[[ -z "${1}" ]] && _usage

View file

@ -1,21 +1,20 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
#
# copy-mointpoint.sh - copy recursivly a mountpoint using tar
# by Tobias Powalowski <tpowa@archlinux.org>
# copy-mointpoint.sh - copy recursivly a mountpoint using tar
# by Tobias Powalowski <tpowa@archlinux.org>
# usage(exitvalue)
# outputs a usage message and exits with value
. /usr/lib/archboot/common.sh
_usage()
{
echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[m\e[1m - COPY MOUNTPOINT:\e[m"
echo -e "\e[1m--------------------------------------\e[m"
echo "- Copy mountpoint recursivly from one mountpoint to an other one,"
echo " using tar utility."
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Copy Mountpoint\e[m"
echo -e "\e[1m--------------------------\e[m"
echo "- Copy mountpoint recursivly from <oldmountpoint> to <newmountpoint>,"
echo -e " using the \e[1mtar\e[m utility."
echo -e "- For system copying start with mounted \e[1m/\e[m and then invoke this script"
echo -e " for each additional mountpoint eg. \e[1m/boot\e[m or \e[1m/home\e[m."
echo ""
echo -e "usage: \e[1m${_BASENAME} <oldmountpoint> <newmountpoint>\e[m"
echo -e "Usage: \e[1m${_BASENAME} <oldmountpoint> <newmountpoint>\e[m"
exit 0
}
##################################################

View file

@ -5,11 +5,11 @@
_MODULE_DIR="/usr/lib/modules/${_RUNNING_KERNEL}"
_FIRMWARE="/lib/firmware"
_usage () {
echo -e "\e[1mCheck Firmware And Modules Archboot Environment\e[m"
echo -e "\e[1m---------------------------------------------------------------\e[m"
echo -e "\e[1m\e[36mArchboot\e[m \e[1m- Check Firmware And Modules\e[m"
echo -e "\e[1m-------------------------------------\e[m"
echo "Check modules on firmware depends and existence in environment."
echo ""
echo -e "usage: \e[1m${_BASENAME} run\e[m"
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
[[ -z "${1}" || "${1}" != "run" ]] && _usage

View file

@ -1,21 +1,20 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
#
# archboot-hwsim.sh - setup a test SSID
# by Tobias Powalowski <tpowa@archlinux.org>
# archboot-hwsim.sh - setup a test SSID
# by Tobias Powalowski <tpowa@archlinux.org>
# usage(exitvalue)
# outputs a usage message and exits with value
. /usr/lib/archboot/common.sh
_usage()
{
echo -e "\e[1mWelcome to \e[34marchboot's\e[m \e[1mHWSIM:\e[m"
echo -e "\e[1m---------------------------------------\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Hwsim\e[m"
echo -e "\e[1m----------------\e[m"
echo "Create a simulated wireless SSID for testing purposes"
echo "with mac80211_hwsim module."
echo "- wlan0 will be setup as the AP. Don't use for scanning!"
echo "- wlan1 will be setup for STATION mode. Use this for scanning for your AP."
echo ""
echo -e "usage: \e[1m${_BASENAME} <SSID>\e[m"
echo "- wlan0 will be setup as the AP. Don't use for scanning!"
echo "- wlan1 will be setup for STATION mode. Use this for scanning for your AP."
echo ""
echo -e "Usage: \e[1m${_BASENAME} <SSID>\e[m"
exit 0
}
[[ -z "${1}" ]] && _usage

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2015 by Roderick W. Smith
# Licensed under the terms of the GPL v3
# replaced GUID with uuidgen
# replaced GUID with uuidgen Tobias Powalowski - <tpowa@archlinux.org>
echo -n "Enter a Common Name to embed in the keys: "
read -r NAME
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=$NAME PK/" -keyout PK.key \

View file

@ -2,6 +2,15 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check not installed packages\e[m"
echo -e "\e[1m---------------------------------------\e[m"
echo "Check the system for uninstalled packages with pacman."
echo ""
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
[[ -z "${1}" || "${1}" != "run" ]] && _usage
_archboot_check
# consider only license package and locale as uninstalled
# it's hard to track manually changes in systemd files

View file

@ -6,25 +6,21 @@
_DESTDIR="${1}"
_usage() {
echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[m \e[1m- QUICKINST INSTALLER:\e[m"
echo -e "\e[1m-------------------------------------------\e[m"
echo -e "usage: \e[1mquickinst <destdir>\e[m"
echo -e "\e[1m\e[36mArchboot\e[m \e[1m- Quickinst Installer\e[m"
echo -e "\e[1m------------------------------\e[m"
echo -e "Usage: \e[1mquickinst <destdir>\e[m"
echo ""
echo "This script is for users who would rather partition/mkfs/mount their target"
echo "media manually than go through the routines in the setup script."
echo "This script is for users, who would rather partition/mkfs/mount"
echo "their target media manually, than go through the routines in"
echo "the setup script."
echo
if ! [[ -e "${_LOCAL_DB}" ]]; then
echo -e "First configure \e[1m/etc/pacman.conf\e[m which repositories to use"
echo -e "and set a mirror in \e[1m/etc/pacman.d/mirrorlist\e[m"
echo -e "Configure repositories: \e[1m/etc/pacman.conf\e[m"
echo -e "Configure mirror: \e[1m/etc/pacman.d/mirrorlist\e[m"
fi
echo
echo -e "Make sure you have all your filesystems mounted under \e[1m<destdir>\e[m."
echo -e "Then run this script to install all packages listed in \e[1m/etc/archboot/defaults\e[m"
echo -e "to \e[1m<destdir>\e[m."
echo
echo "Example:"
echo -e " \e[1mquickinst /mnt\e[m"
echo ""
echo -e "Configure packages to install: \e[1m/etc/archboot/defaults\e[m"
echo -e "Mount all your filesystems: \e[1m<destdir>\e[m."
echo -e "Run: \e[1mquickinst <destdir>\e[m"
exit 0
}

View file

@ -1,22 +1,22 @@
#!/usr/bin/env bash
#
# copy-mointpoint.sh - copy recursivly a mountpoint using tar
# by Tobias Powalowski <tpowa@archlinux.org>
# SPDX-License-Identifier: GPL-3.0-or-later
# rsync-backup.sh - copy files recursivly with rsync
# by Tobias Powalowski <tpowa@archlinux.org>
# usage(exitvalue)
# outputs a usage message and exits with value
. /usr/lib/archboot/common.sh
_usage()
{
echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[m\e[1m - RSYNC BACKUP:\e[m"
echo -e "\e[1m-----------------------------------\e[m"
echo -e "- Copy \e[1mbackupdir\e[m to \e[1mbackupdestination\e[m using rsync."
echo -e "- For system backup, start with \e[1mfull\e[m mounted system and then invoke this script"
echo -e " with system's root directory as \e[1mbackupdir\e[m."
echo -e "- \e[1mexcluded\e[m directories are \e[1m/dev /tmp /proc /sys /run /mnt /media /lost+found\e[m"
echo -e " \e[1mexcluded\e[m \e[1m/sysroot /var/run /var/lib/systemd\e[m"
echo -e "- \e[1m--numeric-ids\e[m option is invoked to \e[1mpreserve\e[m users"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Rsync Backup\e[m"
echo -e "\e[1m-----------------------\e[m"
echo -e "- Copy \e[1m<backupdir>\e[m to \e[1m<backupdestination>\e[m using rsync."
echo -e "- For system backup, start with \e[1mfull\e[m mounted system and then"
echo -e " invoke this script with system's root directory as \e[1mbackupdir\e[m."
echo -e "- \e[1mExcluded\e[m directories are: \e[1m/dev /lost+found /mnt /media /proc /run /sys\e[m"
echo -e " \e[1m/sysroot /tmp /var/lib/systemd /var/run\e[m"
echo -e "- \e[1mUsers\e[m are \e[1mpreserved\e[m as numeric-ids"
echo ""
echo -e "usage: \e[1m${_BASENAME} <backupdir> <backupdestination>\e[m"
echo -e "Usage: \e[1m${_BASENAME} <backupdir> <backupdestination>\e[m"
exit 0
}
##################################################
@ -26,6 +26,6 @@ fi
_BACKUPDESTINATION="${2}"
_BACKUPDIR="${1}"
rsync -aAXv --numeric-ids \
--exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/sysroot/*"} \
--exclude={"/dev/*","/lost+found","/media/*","/mnt/*","/proc/*","/run/*","/sys/*","/sysroot/*","/tmp/*","/var/lib/systemd/*","/var/run/*"} \
"${_BACKUPDIR}" "${_BACKUPDESTINATION}"

View file

@ -2,14 +2,14 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
usage () {
echo -e "\e[1mGenerate Secure Boot keys,MOK files and backup existing keys:\e[m"
echo -e "\e[1m-------------------------------------------------------------\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Generate Secure Boot keys, MOK files\e[m"
echo -e "\e[1m-----------------------------------------------\e[m"
echo "This script generates all needed keys for a Secure Boot setup."
echo -e "It will include the \e[1m2\e[m needed Microsoft certificates, in order"
echo "to avoid soft bricking of devices."
echo -e "Backup of your existing keys are put to \e[1mBACKUP\e[m directory."
echo ""
echo -e "\e[1musage: ${_BASENAME} -name=<your name> <directory>\e[m"
echo -e "Usage: \e[1m${_BASENAME} -name=<your name> <directory>\e[m"
exit 0
}
[[ -z "${1}" || -z "${2}" ]] && usage

View file

@ -6,11 +6,11 @@ _LOOP="/dev/loop0"
_IMG="/test.img"
_PASS="/passphrase"
_usage () {
echo -e "\e[1mTestsuite for Archboot Environment\e[m"
echo -e "\e[1m---------------------------------------------\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Testsuite\e[m"
echo -e "\e[1m--------------------\e[m"
echo "Run automatic tests to detect errors/changes."
echo ""
echo -e "usage: \e[1m${_BASENAME} run\e[m"
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
_run_test () {
@ -168,7 +168,7 @@ _result pacman-error.log
echo -e "Starting pacman database check in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now."
sleep 10
_run_test "pacman database... this takes a while"
archboot-not-installed.sh &>>"${_LOG}"
archboot-not-installed.sh run &>>"${_LOG}"
_result not-installed.log
echo -e "\e[1mResult:\e[m"
if [[ -z "${_TEST_FAIL}" ]]; then

View file

@ -4,15 +4,15 @@
. /etc/archboot/defaults
_usage () {
echo "CREATE ARCHBOOT CONTAINER"
echo "-------------------------"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create Container\e[m"
echo -e "\e[1m---------------------------\e[m"
echo "This will create an archboot container for an archboot image."
echo ""
echo " -cc Cleanup container eg. removing manpages, includes..."
echo " -cp Cleanup container package cache"
echo " -install-source=<server> add package server with archboot repository"
echo ""
echo "usage: ${_BASENAME} <directory> <options>"
echo -e "Usage: \e[1m${_BASENAME} <directory> <options>\e[m"
exit 0
}

View file

@ -3,25 +3,23 @@
# archboot-cpio.sh - modular tool for building an initramfs image
# optimized for size and speed
# by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_CONFIG=""
_CPIO=/usr/lib/archboot/cpio/hooks
_GENERATE_IMAGE=""
_TARGET_DIR=""
_usage() {
cat <<EOF
ARCHBOOT CPIO
-------------
Tool for creating an archboot initramfs image.
-h Display this message and exit
-c <config> Use <config> file
-g <path> Generate cpio image and write to specified <path>
-d <dir> Generate image into <dir>
usage: ${0##*/} <options>
EOF
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Cpio\e[m"
echo -e "\e[1m---------------\e[m"
echo "Tool for creating an archboot initramfs image."
echo
echo " -h Display this message and exit"
echo " -c <config> Use <config> file"
echo " -g <path> Generate cpio image and write to specified <path>"
echo " -d <dir> Generate image into <dir>"
echo
echo -e "Usage: \e[1m${_BASENAME} <options>\e[m"
exit 0
}

View file

@ -7,19 +7,19 @@ _ISODIR="$(mktemp -d ISODIR.XXX)"
_BOOTLOADER="/usr/share/archboot/bootloader"
_usage () {
echo "CREATE ${_ARCH} USB/CD IMAGES"
echo "-----------------------------"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} USB/CD Images\e[m"
echo -e "\e[1m--------------------------------------\e[m"
echo "This will create an archboot iso image."
echo ""
echo " -h This message."
echo " -g Starting generation of image."
echo " -c=CONFIG Which CONFIG should be used."
echo " ${_CONFIG_DIR} locates the configs"
echo " default=${_ARCH}.conf"
echo " -i=IMAGENAME Your IMAGENAME."
echo " -s Save init ramdisk to $(pwd)"
echo " -h This message."
echo " -s Save initramfs to $(pwd)"
echo ""
echo "usage: ${_BASENAME} <options>"
echo -e "Usage: \e[1m${_BASENAME} <options>\e[m"
exit 0
}

View file

@ -17,12 +17,12 @@ _CONFIG_LOCAL="${_ARCH}-local.conf"
_W_DIR="$(mktemp -u archboot-release.XXX)"
_usage () {
echo "CREATE ARCHBOOT RELEASE IMAGE"
echo "-----------------------------"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create Archboot Release Image\e[m"
echo -e "\e[1m----------------------------------------\e[m"
echo "This will create an archboot release image in <directory>."
echo "You can specify a certain <server> with an archboot repository."
echo ""
echo "usage: ${_BASENAME} <directory> <server>"
echo -e "Usage: \e[1m${_BASENAME} <directory> <server>\e[m"
exit 0
}
@ -165,15 +165,15 @@ _create_iso() {
echo "Tobias Powalowski <tpowa@archlinux.org>"
echo ""
echo "Requirement: ${_ARCH} with 800M RAM and higher"
echo "Archboot:$(${_NSPAWN} "${_W_DIR}" pacman -Qi "${_ARCHBOOT}" |\
echo "Archboot: $(${_NSPAWN} "${_W_DIR}" pacman -Qi "${_ARCHBOOT}" |\
rg -o 'Version.* (.*)\r' -r '$1')"
[[ "${_ARCH}" == "riscv64" ]] || echo "Grub: $(${_NSPAWN} "${_W_DIR}" pacman -Qi grub |\
rg -o 'Version.* (.*)\r' -r '$1')"
echo "Linux:$(${_NSPAWN} "${_W_DIR}" pacman -Qi linux |\
echo "Linux: $(${_NSPAWN} "${_W_DIR}" pacman -Qi linux |\
rg -o 'Version.* (.*)\r' -r '$1')"
echo "Pacman:$(${_NSPAWN} "${_W_DIR}" pacman -Qi pacman |\
echo "Pacman: $(${_NSPAWN} "${_W_DIR}" pacman -Qi pacman |\
rg -o 'Version.* (.*)\r' -r '$1')"
echo "Systemd:$(${_NSPAWN} "${_W_DIR}" pacman -Qi systemd |\
echo "Systemd: $(${_NSPAWN} "${_W_DIR}" pacman -Qi systemd |\
rg -o 'Version.* (.*)\r' -r '$1')"
echo ""
if [[ -f "${_W_DIR}"/etc/archboot/ssh/archboot-key ]]; then

View file

@ -5,11 +5,11 @@
_GPG_KEY="/usr/share/archboot/gpg/tpowa.gpg"
_usage () {
echo "CREATE ARCHBOOT REPOSITORY"
echo "--------------------------"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create Repository\e[m"
echo -e "\e[1m----------------------------\e[m"
echo "This will create an archboot repository for an archboot image."
echo ""
echo "usage: ${_BASENAME} <directory>"
echo -e "Usage: \e[1m${_BASENAME} <directory>\e[m"
exit 0
}

View file

@ -28,8 +28,8 @@ _graphic_options() {
}
usage () {
echo -e "\e[1mManage \e[36mArchboot\e[m\e[1m - Arch Linux Environment:\e[m"
echo -e "\e[1m-----------------------------------------\e[m"
echo -e "\e[1mManage \e[36mArchboot\e[m\e[1m - Environment:\e[m"
echo -e "\e[1m------------------------------\e[m"
echo -e " \e[1m-help\e[m This message."
if [[ ! -e "${_LOCAL_DB}" || -e "/usr/bin/setup" ]]; then
echo -e " \e[1m-update\e[m Update scripts: setup, quickinst, network, clock and helpers."