Compare commits
5 Commits
c4f6079077
...
cd91a6b393
| Author | SHA1 | Date | |
|---|---|---|---|
| cd91a6b393 | |||
| a8cd66af94 | |||
| dd7147aee0 | |||
| 6a48a7c929 | |||
| 1a38f8ef3c |
0
backends/fedora/backend.sh
Normal file → Executable file
0
backends/fedora/backend.sh
Normal file → Executable file
@ -26,12 +26,12 @@ set color_highlight=white/blue
|
|||||||
|
|
||||||
### BEGIN /etc/grub.d/10_linux ###
|
### BEGIN /etc/grub.d/10_linux ###
|
||||||
menuentry 'Tuxflotte Provisioning (automatisch)' --class fedora --class gnu-linux --class gnu --class os {
|
menuentry 'Tuxflotte Provisioning (automatisch)' --class fedora --class gnu-linux --class gnu --class os {
|
||||||
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=auto
|
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image vconsole.keymap=de tuxflotte.mode=auto
|
||||||
initrd /boot/x86_64/loader/initrd
|
initrd /boot/x86_64/loader/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry 'Tuxflotte Provisioning (interaktiv)' --class fedora --class gnu-linux --class gnu --class os {
|
menuentry 'Tuxflotte Provisioning (interaktiv)' --class fedora --class gnu-linux --class gnu --class os {
|
||||||
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=interactive
|
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image vconsole.keymap=de tuxflotte.mode=interactive
|
||||||
initrd /boot/x86_64/loader/initrd
|
initrd /boot/x86_64/loader/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,12 +23,12 @@ set color_highlight=white/blue
|
|||||||
|
|
||||||
### BEGIN /etc/grub.d/10_linux ###
|
### BEGIN /etc/grub.d/10_linux ###
|
||||||
menuentry 'Tuxflotte Provisioning (automatisch)' --class fedora --class gnu-linux --class gnu --class os {
|
menuentry 'Tuxflotte Provisioning (automatisch)' --class fedora --class gnu-linux --class gnu --class os {
|
||||||
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=auto
|
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image vconsole.keymap=de tuxflotte.mode=auto
|
||||||
initrd /boot/x86_64/loader/initrd
|
initrd /boot/x86_64/loader/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry 'Tuxflotte Provisioning (interaktiv)' --class fedora --class gnu-linux --class gnu --class os {
|
menuentry 'Tuxflotte Provisioning (interaktiv)' --class fedora --class gnu-linux --class gnu --class os {
|
||||||
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image tuxflotte.mode=interactive
|
linux /boot/x86_64/loader/linux quiet rhgb root=live:CDLABEL=Fedora-Cinn-Live-44 rd.live.image vconsole.keymap=de tuxflotte.mode=interactive
|
||||||
initrd /boot/x86_64/loader/initrd
|
initrd /boot/x86_64/loader/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
live-updates/etc/sudoers.d/90-tuxflotte
Normal file
1
live-updates/etc/sudoers.d/90-tuxflotte
Normal file
@ -0,0 +1 @@
|
|||||||
|
liveuser ALL=(ALL) NOPASSWD: ALL
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Tuxflotte Provisioning
|
||||||
|
Exec=gnome-terminal --title="Tuxflotte Provisioning" -- bash -c 'sudo /opt/tuxflotte/scripts/installer.sh; rc=$?; echo; echo "--- installer.sh beendet (Exit-Code: $rc) ---"; exec bash'
|
||||||
|
X-GNOME-Autostart-enabled=true
|
||||||
|
NoDisplay=true
|
||||||
@ -64,6 +64,22 @@ verify_workdir() {
|
|||||||
echo "GRUB verification passed."
|
echo "GRUB verification passed."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepare_updates() {
|
||||||
|
echo "Assembling live-updates payload..."
|
||||||
|
|
||||||
|
local updates_dir="$WORK_DIR/updates"
|
||||||
|
|
||||||
|
rm -rf "$updates_dir"
|
||||||
|
mkdir -p "$updates_dir/opt/tuxflotte"
|
||||||
|
|
||||||
|
cp -a "$REPO_DIR/live-updates/etc" "$updates_dir/"
|
||||||
|
cp -a "$REPO_DIR/scripts" "$updates_dir/opt/tuxflotte/"
|
||||||
|
cp -a "$REPO_DIR/backends" "$updates_dir/opt/tuxflotte/"
|
||||||
|
cp -a "$REPO_DIR/config" "$updates_dir/opt/tuxflotte/"
|
||||||
|
|
||||||
|
chmod 0440 "$updates_dir/etc/sudoers.d/90-tuxflotte"
|
||||||
|
}
|
||||||
|
|
||||||
create_iso() {
|
create_iso() {
|
||||||
echo "Creating Tuxflotte ISO..."
|
echo "Creating Tuxflotte ISO..."
|
||||||
|
|
||||||
@ -77,6 +93,9 @@ create_iso() {
|
|||||||
-compliance no_emul_toc \
|
-compliance no_emul_toc \
|
||||||
-map "$REPO_DIR/grub/EFI-BOOT-grub.cfg" /EFI/BOOT/grub.cfg \
|
-map "$REPO_DIR/grub/EFI-BOOT-grub.cfg" /EFI/BOOT/grub.cfg \
|
||||||
-map "$REPO_DIR/grub/boot-grub2-grub.cfg" /boot/grub2/grub.cfg \
|
-map "$REPO_DIR/grub/boot-grub2-grub.cfg" /boot/grub2/grub.cfg \
|
||||||
|
-map "$WORK_DIR/updates" /updates \
|
||||||
|
-chown_r 0 /updates -- \
|
||||||
|
-chgrp_r 0 /updates -- \
|
||||||
-boot_image any replay
|
-boot_image any replay
|
||||||
|
|
||||||
echo "ISO created: $output_iso"
|
echo "ISO created: $output_iso"
|
||||||
@ -89,6 +108,7 @@ main() {
|
|||||||
extract_iso
|
extract_iso
|
||||||
patch_grub
|
patch_grub
|
||||||
verify_workdir
|
verify_workdir
|
||||||
|
prepare_updates
|
||||||
create_iso
|
create_iso
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
@ -440,7 +440,7 @@ export_connection_profile() {
|
|||||||
"${NMCLI}" \
|
"${NMCLI}" \
|
||||||
--get-values connection.filename \
|
--get-values connection.filename \
|
||||||
connection show "${connection_name}" 2>/dev/null |
|
connection show "${connection_name}" 2>/dev/null |
|
||||||
head -n 1
|
head -n 1 || true
|
||||||
)"
|
)"
|
||||||
|
|
||||||
if [[ -z "${source_file}" || ! -f "${source_file}" ]]; then
|
if [[ -z "${source_file}" || ! -f "${source_file}" ]]; then
|
||||||
|
|||||||
@ -1,14 +1,37 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
log_info "Datenträger werden erkannt..."
|
SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"
|
||||||
|
readonly SCRIPT_NAME
|
||||||
|
|
||||||
DISKS="$(list_install_disks || true)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
readonly SCRIPT_DIR
|
||||||
|
|
||||||
if [[ -z "$DISKS" ]]; then
|
# shellcheck source=../lib/checks.sh
|
||||||
error_exit "Keine geeigneten Datenträger erkannt."
|
source "${SCRIPT_DIR}/../lib/checks.sh"
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$DISKS"
|
log() {
|
||||||
|
printf '[%s] %s\n' "${SCRIPT_NAME}" "$*"
|
||||||
|
}
|
||||||
|
|
||||||
log_warn "Phase 1: Datenträger werden nur angezeigt, nicht verändert."
|
fatal() {
|
||||||
log_warn "Partitionierung ist noch deaktiviert."
|
printf '[%s] FEHLER: %s\n' "${SCRIPT_NAME}" "$*" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
log "Datenträger werden erkannt..."
|
||||||
|
|
||||||
|
local disks
|
||||||
|
disks="$(list_install_disks || true)"
|
||||||
|
|
||||||
|
[[ -n "${disks}" ]] ||
|
||||||
|
fatal "Keine geeigneten Datenträger erkannt."
|
||||||
|
|
||||||
|
printf '%s\n' "${disks}"
|
||||||
|
|
||||||
|
log "Phase 1: Datenträger werden nur angezeigt, nicht verändert."
|
||||||
|
log "Partitionierung ist noch deaktiviert."
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
|
|||||||
0
scripts/modules/30_runtime_blueprint.sh
Normal file → Executable file
0
scripts/modules/30_runtime_blueprint.sh
Normal file → Executable file
0
scripts/modules/40_backend.sh
Normal file → Executable file
0
scripts/modules/40_backend.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user