6-add-ssh-to-bootloader #20
29
setup.sh
29
setup.sh
@ -746,6 +746,32 @@ EOF
|
|||||||
zfs set org.zfsbootmenu:commandline='rw nowatchdog rd.vconsole.keymap=de-latin1' "${zpool_name}"'/root/'"${zfs_arch_dataset_name}"
|
zfs set org.zfsbootmenu:commandline='rw nowatchdog rd.vconsole.keymap=de-latin1' "${zpool_name}"'/root/'"${zfs_arch_dataset_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function we_want_ssh () {
|
||||||
|
#2.10
|
||||||
|
if [[ "${ARCHZBM_NET_CLIENT_IP}" ]] || \
|
||||||
|
[[ "${ARCHZBM_NET_SERVER_IP}" ]] || \
|
||||||
|
[[ "${ARCHZBM_NET_GATEWAY_IP}" ]] || \
|
||||||
|
[[ "${ARCHZBM_NET_NETMASK}" ]] || \
|
||||||
|
[[ "${ARCHZBM_NET_HOSTNAME}" ]] || \
|
||||||
|
[[ "${ARCHZBM_NET_DEVICE}" ]] || \
|
||||||
|
[[ "${ARCHZBM_NET_AUTOCONF}" ]] || \
|
||||||
|
[[ "${ARCHZBM_SSH_PORT}" ]] || \
|
||||||
|
[[ "${ARCHZBM_SSH_KEEPALIVE_INTVL}" ]] || \
|
||||||
|
[[ "${ARCHZBM_SSH_AUTH_KEYS}" ]]; then
|
||||||
|
>&3 printf -- '%s\n' 'Installing SSH in ZFSBootMenu'
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
>&3 printf -- '%s\n' 'Not installing SSH in ZFSBootMenu'
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function configure_ssh_in_zbm () {
|
||||||
|
#2.11
|
||||||
|
paru_install 'mkinitcpio-nfs-utils' 'dropbear' 'mkinitcpio-dropbear'
|
||||||
|
in_file_in_array_insert_n_at_the_end '/etc/zfsbootmenu/mkinitcpio.conf' 'HOOKS' 'net'
|
||||||
|
in_file_in_array_insert_n_at_the_end '/etc/zfsbootmenu/mkinitcpio.conf' 'HOOKS' 'dropbear'
|
||||||
|
}
|
||||||
|
|
||||||
function add_syslinux_pacman_hook () {
|
function add_syslinux_pacman_hook () {
|
||||||
mkdir -p '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main'
|
mkdir -p '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main'
|
||||||
git -C '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main' clone 'https://quico.space/quico-os-setup/zbm-syslinux-pacman-hook.git' .
|
git -C '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main' clone 'https://quico.space/quico-os-setup/zbm-syslinux-pacman-hook.git' .
|
||||||
@ -799,6 +825,9 @@ function install_os_in_chroot () {
|
|||||||
|
|
||||||
# Install ZFSBootMenu image
|
# Install ZFSBootMenu image
|
||||||
configure_zfsbootmenu #2.9
|
configure_zfsbootmenu #2.9
|
||||||
|
if we_want_ssh; then #2.10
|
||||||
|
configure_ssh_in_zbm #2.11
|
||||||
|
fi
|
||||||
generate-zbm
|
generate-zbm
|
||||||
|
|
||||||
# Yes, we do this twice so we immediately get a functional backup file
|
# Yes, we do this twice so we immediately get a functional backup file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user