From c3ac85d78b8e7c6dc76159361441bf5d3f2c07b2 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Thu, 26 Oct 2017 21:53:13 -0500 Subject: [PATCH] Locking fixes; safety check for bashrc; /etc/skel install fix --- ShadowArch/Makefile | 5 ++++- ShadowArch/bashrc | 4 ++-- ShadowArch/shadowarch | 11 +++++------ .../skel/.config/autostart/xscreensaver.desktop | 1 + .../xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | 1 + .../xfconf/xfce-perchannel-xml/xfce4-session.xml | 1 + 6 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 ShadowArch/skel/.config/autostart/xscreensaver.desktop diff --git a/ShadowArch/Makefile b/ShadowArch/Makefile index 3747b9a..c486184 100644 --- a/ShadowArch/Makefile +++ b/ShadowArch/Makefile @@ -1,6 +1,6 @@ HTTPROOT = /srv/http/aninix.net HTTPUSER = http -SYNCLIST = /etc/vimrc /etc/bashrc /etc/skel /etc/tmux.conf /etc/profile +SYNCLIST = /etc/vimrc /etc/bashrc /etc/tmux.conf /etc/profile INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash compile: ./shadowarch @@ -8,6 +8,7 @@ compile: ./shadowarch install: compile for i in ${SYNCLIST}; do rsync -avz -r `echo $$i | sed 's#^/etc/##'` $$i; done + rm -Rf /etc/skel; cp -pr ./skel /etc # This is a nicety. if [ -f /root/shadowarch* ]; then sed -i 's/`uname -o`/ShadowArch/g' /etc/bashrc; fi @@ -28,6 +29,7 @@ test: reverse: ${HTTPROOT}/shadowarch ${SYNCLIST} cat ${HTTPROOT}/shadowarch > ./shadowarch for i in ${SYNCLIST}; do rsync -avz ${SYNCLIST} .; done + rm -Rf ./skel; cp -pr /etc/skel ./skel sed -i 's/ShadowArch/`uname -o`/' ./bash.bashrc clean: @@ -36,6 +38,7 @@ clean: diff: ${SYNCLIST} if [ -f ${HTTPROOT}/shadowarch ]; then diff ./shadowarch ${HTTPROOT}/shadowarch; echo; fi for i in ${SYNCLIST}; do diff -rc "$$i" ./`echo $$i | rev | cut -f 1 -d '/' | rev`; echo; done + diff -rc /etc/skel ./skel find-missing-hooks-in-src: @for i in `wget -q -O - https://aninix.net/foundation/ | grep toplevel-repo | cut -f 4 -d \'`; do if [ -z $$i ]; then continue; fi; for file in `find ../.. -type f -name Makefile | grep $$i`; do if [ -z "$$file" ]; then echo NO MAKEFILE FOR $$i; elif [ `grep -c -i 'hook for systemd' $$file` -eq 0 ]; then echo HOOK MISSING IN: $$file; else echo HOOK FOUND IN: $$file; fi; done; done diff --git a/ShadowArch/bashrc b/ShadowArch/bashrc index 8d2c8c9..2856ac2 100644 --- a/ShadowArch/bashrc +++ b/ShadowArch/bashrc @@ -22,7 +22,7 @@ esac # Considered untrusted. # https://bugs.archlinux.org/task/55841 -[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion +#[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion [ -f /etc/bash.motd ] && cat /etc/bash.motd @@ -72,7 +72,7 @@ if [ ! -z "$SSH_CLIENT" ]; then fi alias sdr="screen -d -r" fi; -elif [ `who -m | egrep "^$(whoami)" | awk '{ print $2; }' | egrep -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ]; then +elif [ `who -m | egrep "^$(whoami)" | awk '{ print $2; }' | egrep -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ] && [ `pgrep -ac xinit` -eq 0 ]; then exec startxfce4 fi diff --git a/ShadowArch/shadowarch b/ShadowArch/shadowarch index abd2bb3..1b3f75b 100644 --- a/ShadowArch/shadowarch +++ b/ShadowArch/shadowarch @@ -92,9 +92,8 @@ if [ "$nodiskbuild" -eq 0 ]; then # One 200MB boot and the rest is root printf 'mklabel msdos\nmkpart primary ext4 1MiB 201MiB\nmkpart primary ext4 513MiB 100%%FREE\nprint\nquit\n' | parted "$disk" fi - header Making ext4 boot partition on "$disk""$bootpart" - mkfs.ext4 "$disk""$bootpart" - tune2fs -L "BOOT" "$disk""$bootpart" + header Making fat esp partition on "$disk""$bootpart" + mkfs.vfat -n BOOT "$disk""$bootpart" header Making root and mountpoints if [ "$encrypt" -eq 1 ]; then @@ -131,9 +130,9 @@ fi # * make for source packages # * tor for anonymity header Installing ArchLinux to device\(s\) on /mnt -export pkglist="base base-devel parted net-tools bind-tools git openssh make lynx irssi vim wget tor torsocks grub os-prober rsync openntpd tmux" +export pkglist="base base-devel parted net-tools bind-tools git openssh make lynx irssi vim wget tor torsocks grub os-prober rsync openntpd tmux efibootmgr" if [ "$gui" -eq 1 ]; then - export pkglist="$pkglist"" xorg-server xfce4 chromium conky tigervnc xtrlock" + export pkglist="$pkglist"" xorg-server xfce4 chromium conky tigervnc xscreensaver" fi if [ "$spartacus" -eq 1 ]; then export pkglist="$pkglist"" exfat-utils" @@ -179,7 +178,7 @@ fi arch-chroot /mnt mkinitcpio -p linux if [ $? -ne 0 ]; then header ERROR: Cannot continue; exit 1; fi if [ "$nodiskbuild" -eq 0 ]; then - arch-chroot /mnt grub-install --target=i386-pc "$disk" + arch-chroot /mnt grub-install --target=x86_64-efi --bootloader-id=grub --efi-directory /boot "$disk" if [ $? -ne 0 ]; then header ERROR: Cannot continue; exit 1; fi fi arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg diff --git a/ShadowArch/skel/.config/autostart/xscreensaver.desktop b/ShadowArch/skel/.config/autostart/xscreensaver.desktop new file mode 100644 index 0000000..1941b86 --- /dev/null +++ b/ShadowArch/skel/.config/autostart/xscreensaver.desktop @@ -0,0 +1 @@ +xscreensaver diff --git a/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml b/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml index 98ff7ef..d00ab5f 100644 --- a/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml +++ b/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml @@ -31,6 +31,7 @@ + diff --git a/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml b/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml index 276b7ec..f8e3899 100644 --- a/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml +++ b/ShadowArch/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml @@ -5,6 +5,7 @@ +