eval "$f() { [[ $HOSTNAME == $f ]]; }"
done
has_p() { treetowl || iank-dev || x2 || frodo || tp || demohost; }
-has_x() { ! { lj || li; }; }
+has_x() { ! linode; }
linode() { lj || li; }
+has_btrfs() { ! linode; }
+home_network() { ! linode; }
encrypted() { has_p; }
shopt -s extglob
if isdebian-stable; then
pi firefox/$codename-backports
else
- # for a while, firefox/unstable had all it\'s deps satisfied
- # by testing packages, but now i hit a conflict,
- # it wanted a newer libfontconfig1, but emacs build-deps
- # wanted an older one. Oh well, they seem to release
- # a new esr version every 9 months or so.
- pi firefox-esr
+ # for a while, firefox/unstable did not have
+ # dependencies satisfied by testing packages, and i hit
+ # a conflict, it wanted a newer libfontconfig1, but
+ # emacs build-deps wanted an older one. note: They seem
+ # to release a new esr version every 9 months or so.
+ pi firefox/unstable
fi
fi
# for hosts which require nonfree drivers
tu /etc/fstab <<EOF
/dev/mapper/crypt_dev_$dev /i btrfs noatime,subvol=i 0 0
EOF
+
+ tu /etc/crypttab <<EOF
+crypt_dev_$dev /dev/disk/by-id/$dev /q/root/luks/host-treetowl discard,luks
+EOF
+
else
tu /etc/fstab <<'EOF'
/q/i /i none bind 0 0
EOF
- tu /etc/crypttab <<EOF
-crypt_dev_$dev /dev/disk/by-id/$dev /q/root/luks/host-treetowl discard,luks
-EOF
fi
tu /etc/fstab <<'EOF'
s mkdir -p /kr
s chown ian:traci /kr
fi
-if [[ $HOSTNAME == treetowl ]]; then
- tu /etc/fstab <<'EOF'
+
+if home_network; then
+ if [[ $HOSTNAME == treetowl ]]; then
+ tu /etc/fstab <<'EOF'
/k /kr none bind 0 0
EOF
-else
- tu /etc/fstab <<'EOF'
+ else
+ tu /etc/fstab <<'EOF'
treetowl:/k /kr nfs defaults 0 0
EOF
+ fi
fi
s mkdir -p /q/i/{w,k}
for dir in /{i,w,k}; do
- if mountpoint $dir; then continue; fi
+ if mountpoint $dir; then continue; fi # already mounted
s mkdir -p $dir
s chown ian:ian $dir
s mount $dir
done
+dir=/nocow
+l=$(sed -rn "s#^(\s*\S+\s+)/q(\s.*)(subvol=q)#\1$dir\2subvol=nocow#p" /etc/fstab)
+if [[ $l ]] && ! mountpoint $dir; then
+ tu /etc/fstab <<EOF
+$l
+EOF
+ s mkdir -p $dir
+ s chown ian:ian $dir
+ s mount $dir
+fi
+
# ssh and probably some other things care about parent directory
# ownership, and ssh doesn\'t allow any group writable parent