This commit is contained in:
teldra 2022-02-21 10:55:12 +01:00
parent 56413c15e5
commit cc2d2b7e68
4 changed files with 14 additions and 27 deletions

View File

@ -98,12 +98,6 @@ echo "#ignorepkg=linux-firmware-broadcom";
echo "#ignorepkg=wifi-firmware"; } >> /etc/xbps.d/10-ignore-firmware.conf echo "#ignorepkg=wifi-firmware"; } >> /etc/xbps.d/10-ignore-firmware.conf
chmod 755 /etc/xbps.d/10-ignore-firmware.conf chmod 755 /etc/xbps.d/10-ignore-firmware.conf
if ! [ "${LANGUAGE_}" == "en" ]; then
cp -a /etc/profile.d/locale.sh /etc/profile.d/zz-locale-user.sh
sed -i 's/locale.conf/locale-user.conf/' /etc/profile.d/zz-locale-user.sh
sed -i '/^if/i [ "$(id -u)" -eq 0 ] && return' /etc/profile.d/zz-locale-user.sh
fi
vmkdir var/spool/cron vmkdir var/spool/cron
echo '0 * * * * /usr/bin/void-snapshot cron #void.system' > /var/spool/cron/root echo '0 * * * * /usr/bin/void-snapshot cron #void.system' > /var/spool/cron/root

View File

@ -1,5 +1,5 @@
packages() { packages() {
addpkg pipewire alsa-pipewire libjack-pipewire libspa-bluetooth addpkg pipewire alsa-pipewire libjack-pipewire libspa-bluetooth gstreamer1-pipewire libspa-bluetooth libspa-v4l2
} }
config() { config() {

0
files/bin/void-backup Normal file → Executable file
View File

33
files/bin/void-createbackupcontainer Normal file → Executable file
View File

@ -45,38 +45,31 @@ multiplechoice() {
done done
} }
clear echo "Bitte Backupgerät noch nicht anschliessen!"
echo "Bitte Backupgerät noch nicht anschliessen oder wieder entfernen!"
echo "Dücke Enter"
read read
DISKS_DETAILS=$(lsblk -l -o KNAME,TYPE,SIZE,MODEL|grep disk) DISKS_DETAILS=$(lsblk -l -o KNAME,TYPE,SIZE,MODEL|grep disk)
echo "${DISKS_DETAILS}" echo "${DISKS_DETAILS}"
echo "" echo ""
echo "Nun das Gerät anschliessen" echo "Nun das Gerät anschliessen und das neue in der Liste auswaehlen"
echo "Vergleiche diese Ausgabe mit der folgenden"
echo "Drücke Enter"
read read
DISKS_DETAILS=$(lsblk -l -o KNAME,TYPE,SIZE,MODEL|grep disk) DISKS_DETAILS=$(lsblk -l -o KNAME,TYPE,SIZE,MODEL|grep disk)
echo "${DISKS_DETAILS}" echo "${DISKS_DETAILS}"
echo ""
echo "Welches kam neu hinzu?"
DIFF=$(diff <(echo "$a") <(echo "$b")|tail -n-1|awk '{print $2}')
echo "Vermutlich '${DIFF}'"
multiplechoice $(echo "${DISKS_DETAILS}"|awk '{print $1}') multiplechoice $(echo "${DISKS_DETAILS}"|awk '{print $1}')
TARGET_PHY_DISK="${output}" TARGET_PHY_DISK="/dev/${output}"
parted -a optimal "${TARGET_PHY_DISK}" -s -- mklabel gpt
sleep 5
parted -a optimal "${TARGET_PHY_DISK}" unit mib -s -- mkpart backup btrfs 1 100%
sleep 5
sync
parted "${TARGET_PHY_ID}" -s -- mklabel gpt if ! cryptsetup luksFormat "${TARGET_PHY_DISK}1"; then
parted "${TARGET_PHY_ID}" unit mib -s -- mkpart root btrfs 1 100% echo "Konnte ${TARGET_PHY_DISK} nicht verschluesseln."
UUID=$(blkid -o value -s UUID "/dev/${TARGET_PHY_ID}1")
if ! cryptsetup luksFormat UUID="${UUID}"; then
echo "Konnte /dev/disk/by-uuid/${UUID} nicht verschluesseln."
exit 1 exit 1
else else
if ! cryptsetup open UUID="${UUID}" "luks-${UUID}"; then UUID="$(lsblk -l -o KNAME,UUID | grep "$(basename ${TARGET_PHY_DISK})1"|awk '{print $2}')"
echo "Konnte /dev/disk/by-uuid/${UUID} nicht verschluesseln." if ! cryptsetup open "/dev/disk/by-uuid/${UUID}" "luks-${UUID}"; then
echo "Konnte /dev/disk/by-uuid/${UUID} nicht oeffnen."
exit 1 exit 1
fi fi
fi fi