浏览代码

fix logic and command errors

remove deprecated packages

add new packages that were missing

remove start iptables post execution, safer to wait for reboot

modify user dirs to reuse documents for templates
Casey DeLorme 5 年之前
父节点
当前提交
dcd0509478
共有 5 个文件被更改,包括 11 次插入15 次删除
  1. 2 6
      arch.sh
  2. 1 1
      install/etc/skel/.bash_profile
  3. 3 3
      install/etc/skel/.bashrc
  4. 3 3
      install/etc/skel/.config/user-dirs.dirs
  5. 2 2
      setup/install.sh

+ 2 - 6
arch.sh

@@ -53,7 +53,7 @@ curl -O https://download.sublimetext.com/sublimehq-pub.gpg && pacman-key --add s
 [ $(grep -c "sublime-text" /etc/pacman.conf) -eq 0 ] && echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | tee -a /etc/pacman.conf
 
 # update and install all packages
-pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xdotool xsel pulseaudio libpulse lib32-libpulse openal lib32-openal vulkan-tools arandr feh hsetroot openbox obmenu archlinux-xdg-menu compton xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-freefont ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant obs-studio dia mednafen mame ppsspp lutris steam wine python-pip python-setuptools winetricks sublime-text
+pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel pulseaudio libpulse lib32-libpulse openal lib32-openal vulkan-tools arandr feh hsetroot openbox archlinux-xdg-menu compton xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant obs-studio dia mednafen mame ppsspp lutris steam wine python-pip python-setuptools winetricks sublime-text
 
 # if the active network device is wireless install connman
 [ -d "/sys/class/net/${active_network_device}/wireless" ] && pacman -Syu connman wpa_supplicant openvpn ethtool iwd pptpclient && systemctl enable connman
@@ -226,7 +226,7 @@ if [[ -n "$username" && -n "$password" ]]; then
 	su postgres -c "cd && createuser -ds $username" 2> /dev/null && su $username -c "cd && createdb"
 
 	# configure and generate xdg-user-dirs
-	su $username -c "cd && mkdir -p ~/{desktop,downloads,templates,public,documents,music,pictures,videos,git} && xdg-user-dirs-update"
+	su $username -c "cd && mkdir -p ~/{desktop,downloads,public,documents,music,pictures,videos,git} && xdg-user-dirs-update"
 	update-desktop-database
 
 	# generate default (passwordless) ed25519 ssh key if none exists
@@ -259,10 +259,6 @@ ln -sf /usr/local/bin/disk-maintenance /etc/cron.weekly/
 # symlink override vi to vim
 ln -sf /usr/bin/vim /usr/local/bin/vi
 
-# load iptables for security
-# @note: if during this the kernel was upgraded this may fail
-systemctl start iptables
-
 # enable services for next reboot
 systemctl enable iptables
 systemctl enable sshd

+ 1 - 1
install/etc/skel/.bash_profile

@@ -4,4 +4,4 @@
 export PATH=/usr/local/bin:$PATH
 
 # if bashrc exists and the terminal has stdin load it
-[ -f ~/.bashrc ] && test -t 0 && . ~/.bashrc
+test -t 0 && . "$HOME/.bashrc"

+ 3 - 3
install/etc/skel/.bashrc

@@ -1,10 +1,10 @@
 #!/bin/bash
 
-# set language, editor, augment history behavior, enable dynamic resize, and show ~/Library
+# set language, editor, augment history behavior, enable dynamic resize
 export LANG=en_US.UTF-8
 export LANGUAGE=en_US.UTF-8
 export EDITOR=vim
-export HISTFILE=~/.bash_history
+export HISTFILE="$HOME/.bash_history"
 export HISTCONTROL=ignoreboth:erasedups
 shopt -s histappend
 shopt -s checkwinsize
@@ -100,5 +100,5 @@ fi
 export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share"
 
 # use shared agent to load ssh-keys; expects systemd to manage agent
-export SSH_AUTH_SOCK=~/.ssh/socket
+export SSH_AUTH_SOCK="$HOME/.ssh/socket"
 ssh-add -l &> /dev/null || ssh-add

+ 3 - 3
install/etc/skel/.config/user-dirs.dirs

@@ -4,11 +4,11 @@
 # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
 # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
 # absolute path. No other format is supported.
-# 
+#
+XDG_PUBLICSHARE_DIR="$HOME/public"
+XDG_TEMPLATES_DIR="$HOME/public/templates"
 XDG_DESKTOP_DIR="$HOME/desktop"
 XDG_DOWNLOAD_DIR="$HOME/downloads"
-XDG_TEMPLATES_DIR="$HOME/templates"
-XDG_PUBLICSHARE_DIR="$HOME/public"
 XDG_DOCUMENTS_DIR="$HOME/documents"
 XDG_MUSIC_DIR="$HOME/music"
 XDG_PICTURES_DIR="$HOME/pictures"

+ 2 - 2
setup/install.sh

@@ -14,7 +14,7 @@
 #	./setup/install.sh
 
 # check that efivars is mounted or notify the user that it could create a problem
-[ ! -f /sys/firmware/efi/efivars ] && echo "efivars not mounted; this install may leave you with a derelict system..." && sleep 30s
+[ ! -d /sys/firmware/efi/efivars ] && echo "efivars not mounted; this install may leave you with a derelict system..." && sleep 30s
 
 # verify required variables
 while [[ ! "$enable_hibernation" =~ ^[yn]$ ]]; do read -p "would you like to enable hibernation (yn)? " -n1 enable_hibernation && echo ""; done
@@ -68,7 +68,7 @@ parted "/dev/${disk}" -s "mkpart primary linux-swap 1024MiB ${swap_size}MiB"
 parted "/dev/${disk}" -s "mkpart primary btrfs ${swap_size}MiB 100%"
 
 # acquire partitions as an array
-export partitions=( $(lsblk -l "/dev/${disk}" | grep part | awk '{print $1}') )
+export partitions=( $(lsblk -l -xNAME "/dev/${disk}" | grep part | awk '{print $1}') )
 
 # format the partitions
 mkfs.fat -F32 -nEFI "/dev/${partitions[0]}"