X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=distro-begin;h=182a9d92ee2af270a22dfee2e30017c80720def2;hp=4c889b35eb523b4affc399c2d5941101c593215b;hb=90bd397922e7240c41377e7404f79f190bfbc9d8;hpb=15f043c2c297176bd623d8a8602e2dc5d67eacd6 diff --git a/distro-begin b/distro-begin index 4c889b3..182a9d9 100755 --- a/distro-begin +++ b/distro-begin @@ -33,15 +33,8 @@ interactive=true # set this to false to force set -x [[ $- == *i* ]] || interactive=false if ! $interactive; then set -x - set -e -o pipefail fi -set -E -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR -for x in /a/bin/errhandle/*-function; do - source $x -done -set +e -$interactive || errcatch +source /a/bin/errhandle/err ### setup logging exec &> >(sudo tee -a /var/log/distro-begin) @@ -61,8 +54,6 @@ fi ### arg parsing recompile=false -# for copying to a new data fs -bootstrapfs=false # old flag, needs new look before using. while [[ $1 == -* ]]; do case $1 in -r) recompile=true; shift ;; @@ -74,12 +65,12 @@ fi ##### variables/env setup -script_dir="$(readlink -f "$BASH_SOURCE")" +script_dir="$(readlink -f "$BASH_SOURCE")"; script_dir=${script_dir%/*} source $script_dir/pkgs set +x source /a/bin/distro-functions/src/identify-distros $interactive || set -x -for f in iank-dev htpc treetowl x2 frodo tp li lj demohost kw fz; do +for f in iank-dev htpc kd x2 x3 frodo tp li lj demohost kw fz; do eval "$f() { [[ $HOSTNAME == $f ]]; }" done has_p() { ! linode; } # when tp is tracis, then not tp either @@ -209,10 +200,10 @@ conflink ###### bash environment setup set +x -errallow +err-allow source /etc/profile.d/environment.sh source ~/.bashrc -$interactive || errcatch +err-catch $interactive || set -x @@ -223,6 +214,11 @@ Defaults env_keep += SUDOD # makes ubuntu be like debian # https://unix.stackexchange.com/a/91572 Defaults always_set_home +# default setting is to have minimum umask of 0022 +# This lets us have user-specific umasks which are more permissive. +# I did this for transmission and set it's umask gecos on install, +# see there for more info. +Defaults !umask EOF @@ -316,6 +312,7 @@ if has_p; then fi s lnf /q/root/.editor-backups /q/root/.undo-tree-history \ /a/opt /a/c/.emacs.d $HOME/mw_vars /k/backup /root +pi rsync # needed for rootsshsync rootsshsync s lnf /a/c/.vim /a/c/.vimrc /a/c/.gvimrc /root if has_p; then @@ -563,7 +560,7 @@ if has_x; then fi ##### install laptop hardware packages -if tp || x2; then +if tp || x2 || x3; then case $distro in debian) pi task-laptop