From bf08781422f785f71cdbcd628e1bab577c62adf5 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Sat, 18 May 2019 11:10:39 -0500 Subject: [PATCH] bashrc to ssh-agent bugfixes; removing rc.local behavior from ShadowArch install --- EtcFiles/bashrc | 2 +- EtcFiles/shadowarch | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/EtcFiles/bashrc b/EtcFiles/bashrc index 63f625b..0117a2d 100644 --- a/EtcFiles/bashrc +++ b/EtcFiles/bashrc @@ -48,7 +48,7 @@ fi # Tell shell about ssh-agent -- enable with 'systemctl enable ssh-agent@$USER.service' export SSH_AGENT_PID="$(ps -fu "$USER" | grep -v grep | grep -m 1 ssh-agent | awk '{ print $2; }')" if [ -n "$SSH_AGENT_PID" ]; then - export SSH_AUTH_SOCK="$(ls -1 /tmp/ssh-*/agent.$(( $SSH_AGENT_PID - 1 )))" + export SSH_AUTH_SOCK="$(ls -ld /tmp/ssh-*/agent.* | grep -m 1 "$USER" | awk '{ print $9; }')" echo ssh-agent PID is $SSH_AGENT_PID fi # Set up screen/tmux safety nest by default for remote sessions diff --git a/EtcFiles/shadowarch b/EtcFiles/shadowarch index e7b3024..4dc2249 100644 --- a/EtcFiles/shadowarch +++ b/EtcFiles/shadowarch @@ -275,20 +275,6 @@ if [ ! -z "$audio" ]; then printf 'echo 2048 > /sys/class/rtc/rtc0/max_user_freq\necho 2048 > /proc/sys/dev/hpet/max-user-freq\n' >> /mnt/etc/rc.local fi -# Emulate old rc.local behavior -touch /mnt/etc/rc.local -echo '[Unit] -Description=Execute commands at boot - -[Service] -ExecStart=/etc/rc.local - -[Install] -WantedBy=multi-user.target' > /mnt/usr/lib/systemd/system/rclocal.service -arch-chroot /mnt systemctl enable rclocal -arch-chroot /mnt chmod 0700 /etc/rc.local -arch-chroot /mnt chown root: /etc/rc.local - # Set password header Set new root passphrase and depriviledged user '(depriv)' password. arch-chroot /mnt passwd