2017-02: Retroactive Updates

* Switched to Firefox
  * Midori was crashing too often
* Rewrote the wallpaper code
  * Should fix issue where no wallpaper was shown if running from UFD
* The pacman mirrorlist is now a static list.
  * This needs manually updated at build-time

Cleanup
  * Disabled console screen blanking
  * Fixed typo preventing aliases from loading correctly
  * mount-all-volumes now removes /media/hhtech properly
  * Removed leftover netctl files
  * Removed leftover nodm

BREAKING: Moved config files back inside UFD/arch instead of UFD/config
This commit is contained in:
Alan Mason 2017-12-06 17:56:57 -08:00
parent d8952ed26f
commit 1297501714
18 changed files with 82 additions and 68 deletions

View file

@ -1,7 +0,0 @@
#!/bin/bash
for interface in /sys/class/net/wl*; do
break
done
Interface=$(basename $interface)
echo "wl-any: using interface $Interface"

View file

@ -1,6 +0,0 @@
Description='A wpa_supplicant configuration file based wireless connection'
Interface=wl-any
Connection=wireless
Security=wpa-config
WPAConfigFile='/run/archiso/bootmnt/config/wifi.conf'
IP=dhcp

View file

@ -1,5 +0,0 @@
#%PAM-1.0
auth include system-login
account include system-login
password include system-login

View file

@ -4,7 +4,7 @@ alias 7z3='7z a -t7z -mx=3'
alias 7z5='7z a -t7z -mx=5'
alias 7z7='7z a -t7z -mx=7'
alias 7z9='7z a -t7z -mx=9'
alias diff='colordiff' -ur
alias diff='colordiff -ur'
alias du='du -sch --apparent-size'
alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;'
alias hw-info='sudo inxi -ACDdGlMmNopRsxxc 25'

View file

@ -1,4 +1,4 @@
WebBrowser=midori
WebBrowser=firefox
FileManager=Thunar
TerminalEmulator=urxvt

View file

@ -1,8 +1,8 @@
#!/bin/bash
CONKY_RC="$HOME/.conkyrc"
if [[ -f "/run/archiso/bootmnt/config/conky.rc" ]]; then
CONKY_RC="/run/archiso/bootmnt/config/conky.rc"
if [[ -f "/run/archiso/bootmnt/arch/conky.rc" ]]; then
CONKY_RC="/run/archiso/bootmnt/arch/conky.rc"
fi
sleep 2s && conky -c "${CONKY_RC}" -dq

View file

@ -1,19 +1,22 @@
#!/bin/bash
UFD_PATH="/run/archiso/bootmnt/config/"
WALLPAPER="/usr/share/wallpaper/current.png"
BOOT_PATH="/run/archiso/bootmnt/arch/"
BURNED_IN="/usr/share/wallpaper/burned.in"
WALLPAPER="$HOME/.wallpaper.png"
function link_wall() {
sudo rm "$WALLPAPER"
sudo ls -s "$UFD_PATH/Arch.png" "$WALLPAPER"
sudo ln -s "$1" "$WALLPAPER"
}
# Check for UFD source
if [[ -f "$UFD_PATH/Arch.png" ]]; then
link_wall "$UFD_PATH/Arch.png"
elif [[ -f "$UFD_PATH/Arch.jpg" ]]; then
link_wall "$UFD_PATH/Arch.jpg"
fi
# Check for wallpaper
## Checks BOOT_PATH and uses the BURNED_IN file if nothing is found
for f in "$BOOT_PATH"/{Arch,arch}.{jpg,png} "$BURNED_IN"; do
if [[ -f "$f" ]]; then
link_wall "$f"
break
fi
done
# Update Xfce4 (mostly redundant, but will catch multi-display setups)
for monitor in monitor{0..2}; do

View file

@ -1,3 +1,4 @@
setterm -blank 0 -powerdown 0
if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
hw-diags cli
fi

View file

@ -42,7 +42,7 @@ log_keep_days = 10
# Setting allowed_types = * does NOT allow all types, as this is a security
# risk, but does allow all recognized types.
# allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs
allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, hfsplus
allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, hfsplus, tmpfs
# allowed_users is a list of users permitted to mount and unmount with udevil.

View file

@ -3,53 +3,76 @@
set -e -u
# Set hostname
echo "[customize_airootfs] INFO: Set hostname"
echo "wk-arch" > /etc/hostname
echo "127.0.1.1 wk-arch.localdomain wk-arch" >> /etc/hosts
# Set locale
echo "[customize_airootfs] INFO: Set locale"
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
locale-gen
# Time Settings
echo "[customize_airootfs] INFO: Set time"
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
sed -i 's/#FallbackNTP/NTP/' /etc/systemd/timesyncd.conf
#timedatectl set-ntp true
# root user settings
echo "[customize_airootfs] INFO: Setup root user"
usermod -s /usr/bin/zsh root
cp -aT /etc/skel/ /root/
rm /root/.zlogin
chmod 700 /root
echo "root:Abracadabra" | chpasswd
# Add autologin group
# wktech user settings
echo "[customize_airootfs] INFO: Setup wktech user"
groupadd -r autologin
# Add wktech user
useradd -m -s /bin/zsh -G autologin,power,storage,wheel -U wktech
echo "wktech:Abracadabra" | chpasswd
# Enable sudo for %wheel
echo "[customize_airootfs] INFO: Enable sudo"
echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Set mirrorlist. Process:
# Set mirrorlist
echo "[customize_airootfs] INFO: Setup pacman mirrorlist"
## Process:
## Replace newlines with ~ to treat as single line
## Uncomment all US mirrors
## Resetore newlines
## Rank mirrors to only use the top 10 mirrors
mv -b /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
tmp_file="$(mktemp)"
tr '\n' '~' < /etc/pacman.d/mirrorlist.bak | sed -r 's/([0-1]\.[0-9], United States)~#/\1~/g' | tr '~' '\n' > "$tmp_file"
rankmirrors -n 10 "$tmp_file" | egrep '^S' > /etc/pacman.d/mirrorlist
rm -v "$tmp_file"
### BROKEN ###
#mv -bv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
#tmp_file="$(mktemp)"
#tr '\n' '~' < /etc/pacman.d/mirrorlist.bak | sed -r 's/([0-1]\.[0-9], United States)~#/\1~/g' | tr '~' '\n' > "$tmp_file"
#rankmirrors -n 10 "$tmp_file" | egrep '^S' > /etc/pacman.d/mirrorlist
#rm -v "$tmp_file"
### List ranked on 2017-02-25 ###
echo 'Server = http://mirror.htnshost.com/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
echo 'Server = http://mirrors.abscission.net/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://mirror.lty.me/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://ca.us.mirror.archlinux-br.org/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://mirror.kaminski.io/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://mirrors.rit.edu/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://mirror.us.leaseweb.net/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://archlinux.surlyjake.com/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
echo 'Server = http://mirrors.cat.pdx.edu/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
# journald settings (from archiso)
echo "[customize_airootfs] INFO: Setup journald"
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
# logind settings (from archiso)
echo "[customize_airootfs] INFO: Setup logind"
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
echo "[customize_airootfs] INFO: Setup systemd"
#systemctl enable pacman-init.service choose-mirror.service
systemctl set-default graphical.target
echo "[customize_airootfs] INFO: Completed."

View file

@ -20,12 +20,12 @@ function test_connection() {
}
# Load settings
if [[ -f "/run/archiso/bootmnt/config/arch.conf" ]]; then
source "/run/archiso/bootmnt/config/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
if [[ -f "/run/archiso/bootmnt/arch/arch.conf" ]]; then
source "/run/archiso/bootmnt/arch/arch.conf" || \
die "ERROR: failed to load arch.conf (from /run/archiso/bootmnt/arch/)"
else
source "/usr/local/bin/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
die "ERROR: failed to load arch.conf (from /usr/local/bin/)"
fi
# Init

View file

@ -8,6 +8,11 @@ if [[ "$MODE" =~ ^(all|cpu|drives|foh|smart|badblocks)$ ]]; then
SHOW_MENU="False"
fi
SHOW_POWEROPTIONS="False"
if [[ "$MODE" =~ ^cli$ ]]; then
SHOW_POWEROPTIONS="True"
fi
function pause() {
# Pause to review output
echo ""
@ -45,7 +50,7 @@ function menu() {
echo "P: Screen Saver - Pipes"
echo "────────────────────"
echo "Q: Quit"
if [[ "$MODE" =~ ^cli$ ]]; then
if [[ "$SHOW_POWEROPTIONS" =~ ^True$ ]]; then
echo "R: Reboot"
echo "S: Shutdown"
fi

View file

@ -8,12 +8,12 @@ die () {
}
# Load settings
if [[ -f "/run/archiso/bootmnt/config/arch.conf" ]]; then
source "/run/archiso/bootmnt/config/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
if [[ -f "/run/archiso/bootmnt/arch/arch.conf" ]]; then
source "/run/archiso/bootmnt/arch/arch.conf" || \
die "ERROR: failed to load arch.conf (from /run/archiso/bootmnt/arch/)"
else
source "/usr/local/bin/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
die "ERROR: failed to load arch.conf (from /usr/local/bin/)"
fi
# Get TICKET

View file

@ -3,13 +3,12 @@
## Mount all volumes read-only
# Fix issue where first device is mounted under /media/wktech/
TMP_FILE=$(mktemp)
dd bs=1K count=64 if=/dev/zero of="$TMP_FILE" >/dev/null 2>&1
mkfs.msdos "$TMP_FILE" >/dev/null 2>&1
udevil mount -o ro "$TMP_FILE" >/dev/null 2>&1
udevil umount "$TMP_FILE" >/dev/null 2>&1
udevil mount tmpfs >/dev/null 2>&1
udevil umount /media/wktech/tmpfs >/dev/null 2>&1
udevil umount /media/tmpfs >/dev/null 2>&1
sleep 1s
rmdir /media/wktech >/dev/null 2>&1
sudo rmdir /media/wktech/* -p >/dev/null 2>&1
sudo rmdir /media/* -p >/dev/null 2>&1
# Mount all volumes
echo "Mounting all volumes"

View file

@ -8,12 +8,12 @@ die () {
}
# Load settings
if [[ -f "/run/archiso/bootmnt/config/arch.conf" ]]; then
source "/run/archiso/bootmnt/config/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
if [[ -f "/run/archiso/bootmnt/arch/arch.conf" ]]; then
source "/run/archiso/bootmnt/arch/arch.conf" || \
die "ERROR: failed to load arch.conf (from /run/archiso/bootmnt/arch/)"
else
source "/usr/local/bin/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
die "ERROR: failed to load arch.conf (from /usr/local/bin/)"
fi
# Connect to a network

View file

@ -9,8 +9,8 @@ die () {
}
# Load settings
if [[ -f "/run/archiso/bootmnt/config/arch.conf" ]]; then
source "/run/archiso/bootmnt/config/arch.conf" || \
if [[ -f "/run/archiso/bootmnt/arch/arch.conf" ]]; then
source "/run/archiso/bootmnt/arch/arch.conf" || \
die "ERROR: WK_ARCH media may be damaged. Please reboot or try another UFD"
else
source "/usr/local/bin/arch.conf" || \
@ -37,8 +37,8 @@ for d in /sys/class/net/wl*; do
metric_value=$((metric_value+1))
# Create wpa_supplicant entry
if [[ -f "/run/archiso/bootmnt/config/wifi.conf" ]]; then
cp -f "/run/archiso/bootmnt/config/wifi.conf" "/etc/wpa_supplicant/wpa_supplicant-$device.conf"
if [[ -f "/run/archiso/bootmnt/arch/wifi.conf" ]]; then
cp -f "/run/archiso/bootmnt/arch/wifi.conf" "/etc/wpa_supplicant/wpa_supplicant-$device.conf"
elif [[ -f "/usr/local/bin/arch.conf" ]]; then
cp -f "/usr/local/bin/arch.conf" "/etc/wpa_supplicant/wpa_supplicant-$device.conf"
else

View file

@ -29,6 +29,7 @@ elinks
ethtool
exfat-utils
f2fs-tools
firefox
ffmpeg
fsarchiver
gnome-keyring
@ -61,7 +62,6 @@ mc
mdadm
mediainfo
mesa-demos
midori
mkvtoolnix-cli
mprime-bin
mpv
@ -85,6 +85,7 @@ parted
partimage
ppp
pptpclient
progsreiserfs
refind-efi
reiserfsprogs
rfkill

View file

@ -1,9 +1,9 @@
#!/bin/bash
# Set Vars
LOG_DIR="/$HOME/ArchBuilds/BuildLogs"
OUT_DIR="/$HOME/ArchBuilds"
TMP_DIR="/$HOME/TMP_WK_ARCH"
LOG_DIR="/D_Drive/ArchBuilds/BuildLogs"
OUT_DIR="/D_Drive/ArchBuilds"
TMP_DIR="/ScratchDir"
DATE="$(date +%F)"
DATETIME="$(date +%F_%H%M)"