add rescue, fix default pxe, ubuntu locale
[automated-distro-installer] / install-chboot
index 838c0ae02e63565a37963088f8c65490734dc45d..69f46dfb99848bbbdd6641a98ae15108d0df165a 100755 (executable)
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
-# usage install-chboot: isntalls chboot to all /boot subvols,
-# in case there is an issue booting and it is needed.
-# Run this when chboot changes.
 
-cd "${BASH_SOURCE%/*}"
+x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*}
+
+usage() {
+    cat <<EOF
+Usage: ${0##*/} [-h|--help]
+reinstall chboot to /boot subvols, for chboot updates.
+
+We install to /boot in case there is an issue booting and only the /boot
+vol is readily available. For the bootstrap subvol, this is the normal
+case.
+EOF
+    exit $1
+}
+case $1 in
+    -h|--help) usage ;;
+esac
+
 
 e() { echo "$@"; "$@"; }