ShadowArch and other fixes

This commit is contained in:
DarkFeather 2017-07-27 15:30:48 -05:00
parent 7a6f522387
commit aa7f6f7c8f
7 changed files with 13 additions and 22 deletions

View File

@ -1,7 +1,8 @@
LIST=arch-update clean-exim clean-exim-input close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web LIST=arch-update close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web
LOCATION=/root/bin LOCATION=/root/bin
INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash
PERMISSION=0700 PERMISSION=0700
compile: compile:
@echo Nothing to compile. @echo Nothing to compile.

View File

@ -1,4 +0,0 @@
#!/bin/bash
exim -bp | exiqgrep -i | xargs exim -Mrm

View File

@ -1,3 +0,0 @@
#!/bin/bash
ls /var/spool/exim/input | cut -c1-16 | xargs exim -Mrm

View File

@ -15,7 +15,7 @@ install: compile
# This is a nicety. # This is a nicety.
if [ -f /root/shadowarch* ]; then sed -i 's/`uname -o`/ShadowArch/g' /etc/bash.bashrc; fi if [ -f /root/shadowarch* ]; then sed -i 's/`uname -o`/ShadowArch/g' /etc/bash.bashrc; fi
repository: shadowarch repository: shadowarch ${HTTPROOT}
cp ./shadowarch ${HTTPROOT} cp ./shadowarch ${HTTPROOT}
checkperm: ${SYNCLIST} checkperm: ${SYNCLIST}
@ -39,7 +39,7 @@ clean:
diff: ${HTTPROOT}/shadowarch ${SYNCLIST} diff: ${HTTPROOT}/shadowarch ${SYNCLIST}
diff ./shadowarch ${HTTPROOT}/shadowarch diff ./shadowarch ${HTTPROOT}/shadowarch
for i in ${SYNCLIST}; do diff "${i}" ./`echo ${i} | rev | cut -f 1 -d '/' | rev` || [ 1 -eq 1 ]; done for i in ${SYNCLIST}; do diff "$$i" ./`echo $$i | rev | cut -f 1 -d '/' | rev` || [ 1 -eq 1 ]; done
find-missing-hooks-in-src: 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 @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

@ -33,6 +33,7 @@ alias vi=vim
alias view="vim -R" alias view="vim -R"
alias top="top -o %CPU" alias top="top -o %CPU"
alias make-entrypoints="egrep '^[a-zA-Z0-9\-]*:' Makefile" alias make-entrypoints="egrep '^[a-zA-Z0-9\-]*:' Makefile"
if [ -x `which torsocks` ] && [ `systemctl status tor | grep -c running` -eq 1 ]; then alias tor-lynx="torsocks lynx https://check.torproject.org/"; fi
IFS=" IFS="
" "

View File

@ -33,7 +33,7 @@ bootpart=1;
rootpart=2; rootpart=2;
datapart=99; datapart=99;
# TODO Add LVM as an argument # TODO Add LVM as an argument
while getopts "ed:gps" OPTION while getopts "d:egkpmsz" OPTION
do do
case $OPTION in case $OPTION in
d) disk=${OPTARG} ;; d) disk=${OPTARG} ;;
@ -138,9 +138,9 @@ fi
if [ "$kali" -eq 1 ]; then if [ "$kali" -eq 1 ]; then
export pkglist="$pkglist"" extundelete testdisk nmap tcpdump hexedit dcfldd" export pkglist="$pkglist"" extundelete testdisk nmap tcpdump hexedit dcfldd"
if [ "$gui" -eq 1 ]; then if [ "$gui" -eq 1 ]; then
export pkglist=" wireshark-gtk" export pkglist="$pkglist"" wireshark-gtk"
else else
export pkglist=" wireshark-cli" export pkglist="$pkglist"" wireshark-cli"
fi fi
fi fi
if [ "$kitchensink" -eq 1 ]; then if [ "$kitchensink" -eq 1 ]; then
@ -156,12 +156,9 @@ genfstab -U /mnt >> /mnt/etc/fstab
header Set time header Set time
sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /mnt/etc/locale.gen sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /mnt/etc/locale.gen
arch-chroot /mnt locale-gen arch-chroot /mnt locale-gen
ln -s /usr/share/zoneinfo/America/Chicago /mnt/etc/localtime ln -sf /usr/share/zoneinfo/America/Chicago /mnt/etc/localtime
arch-chroot /mnt hwclock --systohc --utc arch-chroot /mnt hwclock --systohc --utc
# Leave a trace of the install.
cp /root/shadowarch /mnt/root/shadowarch.installer."$(date +%F-%R)"
header Setup bootloader header Setup bootloader
if [ "$nodiskbuild" -eq 0 ]; then if [ "$nodiskbuild" -eq 0 ]; then
export rootuuid="$(blkid "$disk""$rootpart" | cut -f 2 -d '"')" export rootuuid="$(blkid "$disk""$rootpart" | cut -f 2 -d '"')"
@ -193,8 +190,8 @@ arch-chroot /mnt systemctl enable netctl
arch-chroot /mnt netctl enable $interface arch-chroot /mnt netctl enable $interface
# Vim cleanup for SSH # Vim cleanup for SSH
mkdir -p /usr/share/vim/vimfiles/plugin arch-chroot /mnt mkdir -p /usr/share/vim/vimfiles/plugin
printf 'set mouse-=a\n' > /usr/share/vim/vimfiles/plugin/shadowarch.vim arch-chroot /mnt printf 'set mouse-=a\n' > /usr/share/vim/vimfiles/plugin/shadowarch.vim
ln -sf /etc/skel/.bashrc /mnt/root/.bashrc ln -sf /etc/skel/.bashrc /mnt/root/.bashrc
@ -226,6 +223,7 @@ arch-chroot /mnt chown -R depriv:depriv /usr/local/src/
# Set SSH host keys # Set SSH host keys
arch-chroot /mnt ssh-keygen -A arch-chroot /mnt ssh-keygen -A
cp /root/shadowarch /mnt/root/shadowarch.installer."$(date +%F-%R)"
if [ "$gui" -eq 1 ]; then if [ "$gui" -eq 1 ]; then
echo "Remember to install your graphics drivers! echo "Remember to install your graphics drivers!

View File

@ -1,4 +1,2 @@
#!/bin/bash #!/bin/bash
/usr/bin/lynx --dump whatismyipaddress.com | grep '/ip/' | head -n 1 | cut -f 5 -d '/' /usr/bin/lynx -connect_timeout=5 -read_timeout=5 -timeout=5 --dump whatismyipaddress.com | grep '/ip/' | head -n 1 | cut -f 5 -d '/'