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 7z5='7z a -t7z -mx=5'
alias 7z7='7z a -t7z -mx=7' alias 7z7='7z a -t7z -mx=7'
alias 7z9='7z a -t7z -mx=9' alias 7z9='7z a -t7z -mx=9'
alias diff='colordiff' -ur alias diff='colordiff -ur'
alias du='du -sch --apparent-size' alias du='du -sch --apparent-size'
alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;'
alias hw-info='sudo inxi -ACDdGlMmNopRsxxc 25' alias hw-info='sudo inxi -ACDdGlMmNopRsxxc 25'

View file

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

View file

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

View file

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

View file

@ -42,7 +42,7 @@ log_keep_days = 10
# Setting allowed_types = * does NOT allow all types, as this is a security # Setting allowed_types = * does NOT allow all types, as this is a security
# risk, but does allow all recognized types. # 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, 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. # allowed_users is a list of users permitted to mount and unmount with udevil.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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