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
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
echo '0 * * * * /usr/bin/void-snapshot cron #void.system' > /var/spool/cron/root

View File

@ -1,5 +1,5 @@
packages() {
addpkg pipewire alsa-pipewire libjack-pipewire libspa-bluetooth
addpkg pipewire alsa-pipewire libjack-pipewire libspa-bluetooth gstreamer1-pipewire libspa-bluetooth libspa-v4l2
}
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
}
clear
echo "Bitte Backupgerät noch nicht anschliessen oder wieder entfernen!"
echo "Dücke Enter"
echo "Bitte Backupgerät noch nicht anschliessen!"
read
DISKS_DETAILS=$(lsblk -l -o KNAME,TYPE,SIZE,MODEL|grep disk)
echo "${DISKS_DETAILS}"
echo ""
echo "Nun das Gerät anschliessen"
echo "Vergleiche diese Ausgabe mit der folgenden"
echo "Drücke Enter"
echo "Nun das Gerät anschliessen und das neue in der Liste auswaehlen"
read
DISKS_DETAILS=$(lsblk -l -o KNAME,TYPE,SIZE,MODEL|grep disk)
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}')
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
parted "${TARGET_PHY_ID}" unit mib -s -- mkpart root btrfs 1 100%
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."
if ! cryptsetup luksFormat "${TARGET_PHY_DISK}1"; then
echo "Konnte ${TARGET_PHY_DISK} nicht verschluesseln."
exit 1
else
if ! cryptsetup open UUID="${UUID}" "luks-${UUID}"; then
echo "Konnte /dev/disk/by-uuid/${UUID} nicht verschluesseln."
UUID="$(lsblk -l -o KNAME,UUID | grep "$(basename ${TARGET_PHY_DISK})1"|awk '{print $2}')"
if ! cryptsetup open "/dev/disk/by-uuid/${UUID}" "luks-${UUID}"; then
echo "Konnte /dev/disk/by-uuid/${UUID} nicht oeffnen."
exit 1
fi
fi