Files
CISS.debian.installer/var/errors.var.sh
Marc S. Weidner bfbe9fa868
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m30s
V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
2025-06-29 16:56:46 +02:00

94 lines
4.7 KiB
Bash

#!/bin/bash
# SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-06-17; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.installer.git
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
# SPDX-PackageName: CISS.debian.installer
# SPDX-Security-Contact: security@coresecret.eu
### Definition of error codes
declare -girx ERR_UNSUPPORTED_BASH=255 # The Bash is not supported.
declare -girx ERR_USER_IS_NOT_ROOT=254 # Not running as root.
declare -girx ERR_UNSAFE_CHARACTER=253 # An invalid character has been used.
declare -girx ERR_UNBOUND_VARIABLE=252 # Unbound variable.
declare -girx ERR_TRAPPED_SIG_INT=251 # The installer detected an INT, which was then confirmed by the user.
declare -girx ERR_FLOCK_PROTECTED=250 # The lock file cannot be opened for writing.
declare -girx ERR_FLOCK_COLLISION=249 # The script is already running.
declare -girx ERR_NO_DOWNLOAD_ARG=248 # 'scurl()' or 'swget()': No arguments specified.
declare -girx ERR_DOWNLOAD_FAILED=247 # 'scurl()' or 'swget()': Download failed.
declare -girx ERR_NO_VALID_RECIPE=246 # No valid 'recipe' string was found in the partitioning.yaml file.
declare -girx ERR_INVALID_IPV4=245 # IPv4 validation failure.
declare -girx ERR_INVALID_IPV6=244 # IPv6 validation failure.
declare -girx ERR_INVALID_PORT=243 # Port validation failure.
declare -girx ERR_ARG_MISMATCH=242 # The wrong number of optional arguments has been provided.
declare -girx ERR_PARTITIONTBL=241 # The partition table is not allowed.
declare -girx ERR_READ_PARTTBL=240 # The partition could not be deleted, created, or the UUID of the partition could not be read.
declare -girx ERR_BTRFS_INITPH=239 # The btrfs subvolume could not be initialized.
declare -girx ERR_BTRFS_SUBVOL=238 # The btrfs subvolume could not be created.
declare -girx ERR_BTRFS_OPTION=237 # Compression options algo:level not valid btrfs pairs.
declare -girx ERR_MOUNTING_DEV=236 # The Device could not be mounted.
declare -girx ERR_MOUNTING_ROOT=235 # The / Volume could not be mounted.
declare -girx ERR_MOUNTING_LUKS=234 # The LUKS Volume could not be mounted.
declare -girx ERR_UNKNOWN_DEV=233 # Unknown Device Path.
### Definition of error trap vars
declare -gx ERRCODE="" # = $? = $1 = ERRCODE
declare -gx ERRSCRT="" # = ${BASH_SOURCE[0]} = $2 = ERRSCRT
declare -gx ERRLINE="" # = ${LINENO} = $3 = ERRLINE
declare -gx ERRFUNC="" # = ${FUNCNAME[0]:-main} = $4 = ERRFUNC
declare -gx ERRCMMD="" # = ${$BASH_COMMAND} = $5 = ERRCMMD
declare -gir ERR_SPLASH_PNG=200 # --change-splash MUST be 'club' or 'hexagon'
declare -gir ERR_CONTROL_CT=201 # --control MUST be an integer between '1' and '65535'
declare -gir ERR_RENICE_PRI=202 # --renice-priority MUST an integer between '-19' and '19'
declare -gir ERR_REIONICE_P=203 # --reionice-priority no values provided.
declare -gir ERR_REIO_P_VAL=204 # --reionice-priority PRIORITY MUST be an integer between '0' and '7'
declare -gir ERR_REIO_C_VAL=205 # --reionice-priority CLASS MUST be an integer between '1' and '3'
declare -gir ERR_MISS_PWD_P=206 # --root-password-file missing password file path argument
declare -gir ERR_MISS_PWD_F=207 # --root-password-file password file does not exist
declare -gir ERR_OWNS_PWD_F=208 # --root-password-file failed to set owner root:root on the PWD file
declare -gir ERR_RGHT_PWD_F=209 # --root-password-file failed to set permissions 0400 on the PWD file
declare -gir ERR_PASS_LENGH=210 # --root-password-file password MUST be between 20 and 64 characters
declare -gir ERR_PASS_PLICY=211 # --root-password-file password MUST NOT contain double quotes
declare -gir ERR__SSH__PORT=212 # --ssh-port MUST be an integer between '1' and '65535'
declare -gir ERR_NOTABSPATH=252 # Not an absolute path
declare -g -i -r -x ERR_DO_NOT_SOURCE=110
declare -g -i -r -x ERR_NO_HIGHST_DEV=115
declare -g -i -r -x ERR_WRONG_PARTTBL=116
declare -g -i -r -x ERR_MOUNTING_PATH=117
declare -g -i -r -x ERR_MOUNTING_ROOT=118
declare -g -i -r -x ERR_CREAT_SUB_VOL=119
declare -g -i -r -x ERR_NO_ENCR_LABEL=120
declare -g -i -r -x ERR_NO_DEVIC_PATH=121
declare -g -i -r -x ERR_UNSUPPT_TABLE=122
declare -g -i -r -x ERR_DE_BOOT_STRAP=123
declare -g -i -r -x ERR_CHROOT_MOUNTS=124
declare -g -i -r -x ERR_UNEXCEPTIONAL=127
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh