progress
This commit is contained in:
parent
8d5ae807ff
commit
0a600059df
18
etc/base
18
etc/base
|
@ -9,10 +9,24 @@ passwd root
|
||||||
echo ${HOSTNAME} > /etc/hostname
|
echo ${HOSTNAME} > /etc/hostname
|
||||||
echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
||||||
echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
|
echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
|
||||||
if ! [ "$L1" == "en_US" ]; then
|
if ! [ "$LANGUAGE" == "en" ]; then
|
||||||
echo "LANG=${L1}.UTF-8" > /etc/locale.conf
|
|
||||||
echo "${L1}.UTF-8 UTF-8" >> /etc/default/libc-locales
|
echo "${L1}.UTF-8 UTF-8" >> /etc/default/libc-locales
|
||||||
fi
|
fi
|
||||||
xbps-reconfigure -f glibc-locales
|
xbps-reconfigure -f glibc-locales
|
||||||
echo "GRUB_ENABLE_CRYPTODISK=y" >> /etc/default/grub
|
echo "GRUB_ENABLE_CRYPTODISK=y" >> /etc/default/grub
|
||||||
|
|
||||||
|
cat <<EOF > ${target}/etc/fstab
|
||||||
|
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
||||||
|
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root / btrfs defaults,subvol=root 0 0
|
||||||
|
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root /home btrfs defaults,subvol=home 0 0
|
||||||
|
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap swap swap defaults 0 0
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ "$EFI" == "1" ]; then
|
||||||
|
echo "${TARGET_PHY_WWN}-part1 /boot/efi vfat defaults 0 0" >> ${target}/etc/fstab
|
||||||
|
fi
|
||||||
|
|
||||||
|
uuid=$(blkid -o value -s UUID ${TARGET_PHY_WWN}-part${TARGET_PART})
|
||||||
|
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.luks.uuid=${uuid} /" ${target}/etc/default/grub
|
||||||
|
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.lvm.vg=vg_${TARGETNAME_UNDERSCORE} /" ${target}/etc/default/grub
|
||||||
}
|
}
|
40
main.sh
40
main.sh
|
@ -199,11 +199,8 @@ printing() {
|
||||||
lang() {
|
lang() {
|
||||||
input "Which language?" "de en" "unknown error"
|
input "Which language?" "de en" "unknown error"
|
||||||
LANGUAGE=$output
|
LANGUAGE=$output
|
||||||
L1=en_US
|
|
||||||
L2=en
|
|
||||||
if [ "$LANGUAGE" == "de" ]; then
|
if [ "$LANGUAGE" == "de" ]; then
|
||||||
L1=de_DE
|
L1=de_DE
|
||||||
L2=de
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,39 +220,30 @@ do_install() {
|
||||||
|
|
||||||
do_chroot() {
|
do_chroot() {
|
||||||
mkdir -p ${target}/tmp/vinstaller/run
|
mkdir -p ${target}/tmp/vinstaller/run
|
||||||
cp etc/base ${target}/tmp/vinstaller/run
|
|
||||||
|
cp ${main}/etc/base ${target}/tmp/vinstaller/run
|
||||||
if ! [ "$DE" == "minimal" ]; then
|
if ! [ "$DE" == "minimal" ]; then
|
||||||
cp etc/gfx/$GFX ${target}/tmp/vinstaller/run
|
cp ${main}/etc/gfx/$GFX ${target}/tmp/vinstaller/run
|
||||||
cp etc/soundsystem/$SOUNDSYSTEM ${target}/tmp/vinstaller/run
|
cp ${main}/etc/soundsystem/$SOUNDSYSTEM ${target}/tmp/vinstaller/run
|
||||||
cp etc/gfx/$DE ${target}/tmp/vinstaller/run
|
cp ${main}/etc/gfx/$DE ${target}/tmp/vinstaller/run
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "USERNAME=$USERNAME" > ${target}/tmp/vinstaller/vars
|
||||||
|
echo "HOSTNAME=$HOSTNAME" >> ${target}/tmp/vinstaller/vars
|
||||||
|
echo "EFI=$EFI" >> ${target}/tmp/vinstaller/vars
|
||||||
|
echo "LANGUAGE=$LANGUAGE" >> ${target}/tmp/vinstaller/vars
|
||||||
|
echo "TARGET_PHY_WWN=$TARGET_PHY_WWN" >> ${target}/tmp/vinstaller/vars
|
||||||
|
echo "TARGET_PART=$TARGET_PART" >> ${target}/tmp/vinstaller/vars
|
||||||
|
echo "TARGETNAME_UNDERSCORE=$TARGETNAME_UNDERSCORE" >> ${target}/tmp/vinstaller/vars
|
||||||
|
|
||||||
cat <<EOF > ${target}/tmp/vinstaller/main_chroot
|
cat <<EOF > ${target}/tmp/vinstaller/main_chroot
|
||||||
|
. /tmp/vinstaller/vars
|
||||||
for file in $(find /tmp/vinstaller/run -type f); do
|
for file in $(find /tmp/vinstaller/run -type f); do
|
||||||
. $file
|
. $file
|
||||||
config
|
config
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "USERNAME=$USERNAME" > ${target}/tmp/vinstaller/vars
|
|
||||||
echo "HOSTNAME=$HOSTNAME" >> ${target}/tmp/vinstaller/vars
|
|
||||||
echo "EFI=$EFI" >> ${target}/tmp/vinstaller/vars
|
|
||||||
echo "LANGUAGE=$LANGUAGE" >> ${target}/tmp/vinstaller/vars
|
|
||||||
|
|
||||||
cat <<EOF > ${target}/etc/fstab
|
|
||||||
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
|
||||||
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root / btrfs defaults,subvol=root 0 0
|
|
||||||
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root /home btrfs defaults,subvol=home 0 0
|
|
||||||
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap swap swap defaults 0 0
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ "$EFI" == "1" ]; then
|
|
||||||
echo "${TARGET_PHY_WWN}-part1 /boot/efi vfat defaults 0 0" >> ${target}/etc/fstab
|
|
||||||
fi
|
|
||||||
|
|
||||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_WWN}-part${TARGET_PART})
|
|
||||||
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.luks.uuid=${uuid} /" ${target}/etc/default/grub
|
|
||||||
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.lvm.vg=vg_${TARGETNAME_UNDERSCORE} /" ${target}/etc/default/grub
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user