Locking fixes; safety check for bashrc; /etc/skel install fix

This commit is contained in:
DarkFeather 2017-10-26 21:53:13 -05:00
parent b33a8f98fd
commit c3ac85d78b
6 changed files with 14 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
xscreensaver

View File

@ -31,6 +31,7 @@
<property name="&lt;Super&gt;p" type="string" value="xfce4-display-settings --minimal"/>
<property name="override" type="bool" value="true"/>
<property name="&lt;Super&gt;t" type="string" value="xfce4-terminal"/>
<property name="&lt;Super&gt;l" type="string" value="xscreensaver-command -l"/>
<property name="&lt;Super&gt;e" type="string" value="/usr/bin/thunar"/>
<property name="&lt;Alt&gt;F2" type="string" value="xfce4-appfinder --collapsed"/>
<property name="&lt;Super&gt;b" type="string" value="/usr/bin/chromium"/>

View File

@ -5,6 +5,7 @@
<property name="FailsafeSessionName" type="empty"/>
<property name="SessionName" type="string" value="Default"/>
<property name="SaveOnExit" type="bool" value="true"/>
<property name="LockCommand" type="string" value="xscreensaver-command -l"/>
</property>
<property name="sessions" type="empty">
<property name="Failsafe" type="empty">