From e688da727d2f4620e52a26e77f190c65d6627e7e Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 8 May 2016 15:34:50 -0700 Subject: [PATCH] various fixes --- distro-begin | 28 ++++++++++++++++++---------- distro-end | 4 ++-- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/distro-begin b/distro-begin index 07b19b3..d870fe6 100755 --- a/distro-begin +++ b/distro-begin @@ -359,13 +359,11 @@ case $(distro-name) in pi xorg-server redshift xorg-xinput pkgfile libxtst xmacro # like apt-cache s pkgfile --update - ;;& -esac -# background: -# https://aur.archlinux.org/packages/xkbset/#comment-545419 -cert=$(mktemp) -cat >$cert <<'EOF' + # background: + # https://aur.archlinux.org/packages/xkbset/#comment-545419 + cert=$(mktemp) + cat >$cert <<'EOF' -----BEGIN CERTIFICATE----- MIIJADCCB+igAwIBAgIRAIVAhZ0TMbQ5jTm0koI8X6YwDQYJKoZIhvcNAQELBQAw djELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1JMRIwEAYDVQQHEwlBbm4gQXJib3Ix @@ -486,8 +484,15 @@ L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG jjxDah2nGN59PRbxYvnKkKj9 -----END CERTIFICATE----- EOF -cat /etc/ssl/certs/ca-certificates.crt >> $cert -CURL_CA_BUNDLE=$cert pi xkbset + cat /etc/ssl/certs/ca-certificates.crt >> $cert + CURL_CA_BUNDLE=$cert pi xkbset + + ;;& + ubuntu|debian|fedora) + pi xkbset + ;;& +esac + pi xbindkeys cryptsetup @@ -536,8 +541,11 @@ frodo:/k /kfrodo nfs defaults 0 0 EOF fi -for x in i w k; do - s mount /$i || [[ $? == 32 ]] # 32 = already mounted +for dir in /{i,w,k}; do + if mountpoint $dir; then continue; fi + s mkdir -p $dir + s chown ian:ian $dir + s mount $dir done diff --git a/distro-end b/distro-end index 3ebc231..a30963f 100755 --- a/distro-end +++ b/distro-end @@ -1040,12 +1040,12 @@ tu /etc/hosts <<< "127.0.1.1 $(hostname).lan $(hostname)" rootdev=$(mount | sed -rn 's#^(\S+) on / .*#\1#p') s mkdir /mnt/root tu /etc/fstab <<< "$rootdev /mnt/root btrfs noatime,subvolid=0 0 0" -s mount /mnt/root || [[ $? == 32 ]] +mountpoint /mnt/root || s mount /mnt/root idev=$(mount | sed -rn 's#^(\S+) on /i .*#\1#p') if [[ $idev != $rootdev ]]; then s mkdir /mnt/iroot tu /etc/fstab <<< "$idev /mnt/iroot btrfs noatime,subvolid=0 0 0" - s mount /mnt/iroot || [[ $? == 32 ]] + mountpoint /mnt/iroot || s mount /mnt/iroot fi # Do this again because it occasionally has changes and -- 2.30.2