new
This commit is contained in:
parent
d3ffca3367
commit
b6fc5b20b5
30
etc/base
30
etc/base
|
@ -39,17 +39,17 @@ tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
|||
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root /var/lib/backup/quelle/rootfs btrfs defaults 0 0
|
||||
EOF
|
||||
|
||||
if [ "${ENCRYPTION_STYLE}" == "e" ]; then
|
||||
uuid=$(blkid -o value -s UUID "${BOOTDEV}")
|
||||
echo "UUID=${uuid} /boot btrfs defaults,subvol=bootfs 0 0" >> /etc/fstab
|
||||
fi
|
||||
|
||||
if [ "$EFI" == "1" ]; then
|
||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_ID}-part1)
|
||||
echo "UUID=${uuid} /boot/efi vfat defaults 0 0" >> /etc/fstab
|
||||
echo "efivarfs /sys/firmware/efi/efivars efivarfs defaults,nosuid,nodev,noexec 0 0" >> /etc/fstab
|
||||
fi
|
||||
|
||||
if [ "${ENCRYPTION_STYLE}" == "e" ]; then
|
||||
uuid=$(blkid -o value -s UUID "${BOOTDEV}")
|
||||
echo "UUID=${uuid} /boot btrfs defaults,subvol=bootfs 0 0" >> /etc/fstab
|
||||
fi
|
||||
|
||||
if [ "$ENCRYPTION_STYLE" == "a" ] || [ "$ENCRYPTION_STYLE" == "d" ]; then
|
||||
dd bs=1 count=64 if=/dev/urandom of=/boot/volume.key
|
||||
echo -n "${PASS}" | cryptsetup luksAddKey $TARGET_PHY_ID-part${TARGET_PART} /boot/volume.key
|
||||
|
@ -61,16 +61,16 @@ if [ "$ENCRYPTION_STYLE" == "a" ] || [ "$ENCRYPTION_STYLE" == "d" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$ENC" == "1" ]; then
|
||||
echo "echo \"Disk pw is '${PASS}'\"" > /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo "read -p \"Change PW for disk? y/n \" answer" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo " while ! cryptsetup luksChangeKey /dev/disk/by-id/${TARGET_PHY_ID}-part${TARGET_PART}; do" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo " echo \"Again, please\"" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo " done" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo " rm -rf /etc/runit/core-services/99-changepwdisk.sh" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
echo "fi" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
fi
|
||||
#if [ "$ENC" == "1" ]; then
|
||||
# echo "echo \"Disk pw is '${PASS}'\"" > /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo "read -p \"Change PW for disk? y/n \" answer" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " while ! cryptsetup luksChangeKey /dev/disk/by-id/${TARGET_PHY_ID}-part${TARGET_PART}; do" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " echo \"Again, please\"" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " done" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " rm -rf /etc/runit/core-services/99-changepwdisk.sh" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo "fi" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
#fi
|
||||
|
||||
useradd -G wheel,socklog,audio,video,floppy,cdrom,optical,input,users -U -m -s /usr/bin/bash -c "${USERNAME}" "${USERNAME}"
|
||||
grep -q lpadmin /etc/group && usermod -a -G lpadmin "${USERNAME}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user