X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-begin;h=38fcd59c12b5564982ea08db8b1d0358eec892cc;hb=0b6d44c7f3d567e0a26138509c8a24cb57c69b50;hp=fa5db412c9aac50d910a353120520304840967cf;hpb=2cff2dd2b8040e6cbd721932ae09142881d7e0a6;p=distro-setup diff --git a/distro-begin b/distro-begin index fa5db41..38fcd59 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 @@ -143,6 +134,15 @@ EOF sudo systemctl daemon-reload # needed if the file was already there sudo systemctl enable keyscriptoff.service sudo systemctl start keyscriptoff.service + + # from /usr/share/doc/dropbear-initramfs/README.initramfs.gz + while read m _; do /sbin/modinfo -F filename "$m"; done /lib/cryptsetup/passfifo fi ##### end setup encryption scripts ###### @@ -209,10 +209,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 @@ -321,6 +321,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 @@ -568,7 +569,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