diff --git a/etc/base b/etc/base index a1664c8..fbfbf2a 100644 --- a/etc/base +++ b/etc/base @@ -6,6 +6,12 @@ config() { chown root:root / chmod 755 / echo ${HOSTNAME} > /etc/hostname +ln -sf "/usr/share/zoneinfo/${timezone}" /etc/localtime +sed -i "s/#HOSTNAME=\"void-live\"/HOSTNAME=${HOSTNAME}/g" /etc/rc.conf +sed -i "s/Europe\/Madrid/${timezone//\//\\/}/" /etc/rc.conf +sed -i "/HARDWARECLOCK/s/^#//g" /etc/rc.conf +sed -i "/FONT=/s/^#//g" /etc/rc.conf + echo "LANG=en_US.UTF-8" > /etc/locale.conf echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales if ! [ "$LANGUAGE" == "en" ]; then @@ -39,9 +45,31 @@ if [ "$ENCRYPTION_STYLE" == "a" ] || [ "$ENCRYPTION_STYLE" == "d" ]; then echo "luks_${TARGETNAME_UNDERSCORE} $TARGET_PHY_ID-part${TARGET_PART} /boot/volume.key luks" >> /etc/crypttab echo "install_items+=\" /boot/volume.key /etc/crypttab \"" > /etc/dracut.conf.d/10-crypt.conf fi + +if [ "$ENC" == "1" ]; then + echo "echo \"Install 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-uuid/${cfg[partuuid]}; 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 -m -s /usr/bin/bash $USERNAME echo "$USERNAME:$pass" | chpasswd passwd -dl root +echo "echo \"Install pw is ${pass}\"" > /etc/runit/core-services/99-changepwuser.sh +echo "read -p \"Change PW for ${users[name1]}? y/n \" answer" >> /etc/runit/core-services/99-changepwuser.sh +echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwuser.sh +echo " while ! passwd ${users[name1]}; do" >> /etc/runit/core-services/99-changepwuser.sh +echo " echo \"Again, please\"" >> /etc/runit/core-services/99-changepwuser.sh +echo " done" >> /etc/runit/core-services/99-changepwuser.sh +echo " rm -rf /etc/runit/core-services/99-changepwuser.sh" >> /etc/runit/core-services/99-changepwuser.sh +echo "fi" >> /etc/runit/core-services/99-changepwuser.sh + + } \ No newline at end of file diff --git a/etc/xserver/x11 b/etc/xserver/x11 index 955f7cf..d0c8cf9 100644 --- a/etc/xserver/x11 +++ b/etc/xserver/x11 @@ -1,3 +1,18 @@ packages() { addpkg "xorg-minimal" "xorg-apps" +} + +config() { + ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf "${dest}"/etc/fonts/conf.d/ + + if [ "$LANGUAGE" == "de" ]; then + mkdir -p /etc/X11/xorg.conf.d + { echo "Section \"InputClass\""; + echo " Identifier \"keyboard\""; + echo " MatchIsKeyboard \"yes\""; + echo " Option \"XkbLayout\" \"de\""; + echo " Option \"XkbVariant\" \"nodeadkeys\""; + echo " #Option \"XkbOptions\" \"grp:alt_shift_toggle\""; + echo "EndSection"; } > /etc/X11/xorg.conf.d/10-keyboard.conf + fi } \ No newline at end of file diff --git a/main.sh b/main.sh index f4d6d58..4e09338 100644 --- a/main.sh +++ b/main.sh @@ -4,6 +4,7 @@ main="/tmp/vinstall" target="${main}/target" tmp_target="${main}/tmp_target" pass="oem" +timezone="Europe/Berlin" if [ $DEBUG ]; then umount -R ${target}/boot/efi ${target}/boot ${target}/tmp/vinstaller/ ${target} @@ -343,6 +344,7 @@ do_chroot() { echo "TARGET_PART=$TARGET_PART" >> ${target}/tmp/vinstaller/vars echo "TARGETNAME_UNDERSCORE=$TARGETNAME_UNDERSCORE" >> ${target}/tmp/vinstaller/vars echo "ENCRYPTION_STYLE=$ENCRYPTION_STYLE" >> ${target}/tmp/vinstaller/vars + echo "timezone=$timezone" >> ${target}/tmp/vinstaller/vars cat < ${target}/tmp/vinstaller/main_chroot #!/bin/bash