This commit is contained in:
simono41 2018-04-05 21:03:30 +02:00
parent 436ae42d84
commit ad0094e90e

View file

@ -9,9 +9,11 @@ repo="SpectreOS"
user="user1" user="user1"
version="%VERSION%" version="%VERSION%"
[[ -n "${2}" ]] && version=${2} if [[ -n "${2}" ]]; then
version=${2}
[[ "$version" == "%VERSION%" ]] && version=voll else
[[ "$version" == "%VERSION%" ]] && version=voll
fi
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2
@ -133,7 +135,15 @@ function usbsecret() {
function cron() { function cron() {
echo "cron-job snapshot" echo "cron-job snapshot"
mkdir -p ${mountpoint}/var/spool/cron/ mkdir -p ${mountpoint}/var/spool/cron/
echo "0 18 * * * /usr/bin/snapshot make ROOT home opt var/cache/pacman/pkg ${mountsnaps}" > ${mountpoint}/var/spool/cron/root echo "0 18 * * * /usr/bin/snapshot make ROOT home opt var/cache/pacman/pkg " > ${mountpoint}/var/spool/cron/root
# custom-mounts
for wort in ${mountsnaps}
do
echo -n "${wort#/*} " >> ${mountpoint}/var/spool/cron/root
done
echo "" >> ${mountpoint}/var/spool/cron/root
if [ "${update}" != "n" ]; then if [ "${update}" != "n" ]; then
cp /opt/${repo}/snapshot.sh ${mountpoint}/usr/bin/snapshot cp /opt/${repo}/snapshot.sh ${mountpoint}/usr/bin/snapshot
chmod 755 ${mountpoint}/usr/bin/snapshot chmod 755 ${mountpoint}/usr/bin/snapshot
@ -276,11 +286,11 @@ function installation {
fi fi
if [ "${version}" != "libre" ]; then if [ "${version}" != "libre" ]; then
if [ "${verschluesselung}" == "y" ]; then if [ "${verschluesselung}" == "y" ]; then
parameter="${parameter}plymouth-encrypt " parameter="${parameter}plymouth-encrypt "
else else
parameter="${parameter}plymouth " parameter="${parameter}plymouth "
fi fi
fi fi
@ -653,17 +663,17 @@ function systemdboot() {
echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf
#if [ "${version}" != "libre" ]; then #if [ "${version}" != "libre" ]; then
#echo "title "${repo}-lts"" > ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf #echo "title "${repo}-lts"" > ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf
#echo "linux /vmlinuz-linux-lts" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf #echo "linux /vmlinuz-linux-lts" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf
#echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf #echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf
#echo "initrd /initramfs-linux-lts.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf #echo "initrd /initramfs-linux-lts.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf
#echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf #echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-lts.conf
#echo "title "${repo}-lts"" > ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf #echo "title "${repo}-lts"" > ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf
#echo "linux /vmlinuz-linux-lts" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf #echo "linux /vmlinuz-linux-lts" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf
#echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf #echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf
#echo "initrd /initramfs-linux-fallback-lts.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf #echo "initrd /initramfs-linux-fallback-lts.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf
#echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf #echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback-lts.conf
#fi #fi
echo "default arch-uefi" > ${mountpoint}/boot/loader/loader.conf echo "default arch-uefi" > ${mountpoint}/boot/loader/loader.conf
@ -678,7 +688,7 @@ function systemdboot() {
arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \vmlinuz-linux -L "Arch Linux efistub" -u "initrd=/initramfs-linux.img root=${tobootdevice} rw ${parameter}quiet splash" arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \vmlinuz-linux -L "Arch Linux efistub" -u "initrd=/initramfs-linux.img root=${tobootdevice} rw ${parameter}quiet splash"
#if [ "${version}" != "libre" ]; then #if [ "${version}" != "libre" ]; then
#arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \vmlinuz-linux-lts -L "Arch Linux efistub" -u "initrd=/initramfs-linux-lts.img root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" #arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \vmlinuz-linux-lts -L "Arch Linux efistub" -u "initrd=/initramfs-linux-lts.img root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash"
#fi #fi
# überschreibt die efistub deswegen entfernt # überschreibt die efistub deswegen entfernt
#arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \vmlinuz-linux -L "Arch Linux fallback efistub" -u "initrd=/initramfs-linux-fallback.img root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" #arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \vmlinuz-linux -L "Arch Linux fallback efistub" -u "initrd=/initramfs-linux-fallback.img root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash"
@ -1025,9 +1035,9 @@ then
partionierenohneswap partionierenohneswap
fi fi
else else
if [ "${verschluesselung}" == "y" ]; then if [ "${verschluesselung}" == "y" ]; then
cryptsetup luksOpen ${device}${rootpartitionnummer} luks0 cryptsetup luksOpen ${device}${rootpartitionnummer} luks0
fi fi
fi fi
echo "installation" echo "installation"
@ -1060,9 +1070,9 @@ elif [ "${Partition}" == "bios" ]; then
partionierenohneswap partionierenohneswap
fi fi
else else
if [ "${verschluesselung}" == "y" ]; then if [ "${verschluesselung}" == "y" ]; then
cryptsetup luksOpen ${device}${rootpartitionnummer} luks0 cryptsetup luksOpen ${device}${rootpartitionnummer} luks0
fi fi
fi fi
echo "installation" echo "installation"