uniserv-restore: with option "--info" the program just shows version info.
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-bii_scripts/bin/uniserv-restore new-bii_scripts/bin/uniserv-restore
--- old-bii_scripts/bin/uniserv-restore 2022-11-28 21:50:24.424074030 +0100
+++ new-bii_scripts/bin/uniserv-restore 2022-11-28 21:50:24.424074030 +0100
@@ -30,6 +30,7 @@
dryrun=""
configfile=""
+info=""
# directory to create:
dir=""
@@ -97,6 +98,8 @@
echo "OPTIONS:"
echo " -h --help :"
echo " this help"
+ echo " --info :"
+ echo " Just show information about the version."
echo " --dir DIR :"
echo " Create source tree in directory DIR. Otherwise a"
echo " directory name is created from the SHORTVERSION string"
@@ -121,6 +124,10 @@
print_short_help
exit 0
;;
+ --info)
+ info="yes"
+ shift
+ ;;
--dir)
dir="$2"
shift 2
@@ -170,6 +177,7 @@
if [ -z "$configfile" ]; then
# Take rsync-dist config file from bii_scripts share directory.
# read bii_scripts configuration variables:
+ BII_SCRIPTS_TOP="$MYDIR/.."
source $MYDIR/bii_scripts.config
if [ $? -ne 0 ]; then
echo "error, file bii_scripts.config not found" >&2
@@ -217,6 +225,23 @@
exit 1
fi
VERSION=$(echo "$TAGFILE" | sed -e "s#$RSYNC_DIST_PATH/##;s#/.*##")
+else
+ # get rsync dist version name:
+ if [ -n "$info" ]; then
+ CMDRET "ssh $RSYNC_DIST_USER@$RSYNC_DIST_HOST ls $RSYNC_DIST_PATH/$VERSION/version"
+ if [ $cmdret -ne 0 ]; then
+ echo "ssh command failed" >&2
+ exit 1
+ fi
+ SHORTVERSION="$cmddata"
+ fi
+fi
+
+if [ -n "$info" ]; then
+ echo "ISOVERSION : $VERSION"
+ echo "SHORTVERSION : $SHORTVERSION"
+ echo "Install location: $RSYNC_DIST_PATH/$VERSION on host $RSYNC_DIST_HOST"
+ exit 0
fi
QVERSION=`echo $VERSION | sed -e 's/:/\\:/g'`
patch 7dad825021cbf6e00a5100cb5f88e0a9118d859d
Author: Goetz Pfeiffer <Goetz.Pfeiffer@helmholtz-berlin.de>
Date: Wed Sep 8 15:33:06 CEST 2021
* uniserv-restore: with option "--info" the program just shows version info.
When "--info" is given the script *does not* restore uniserv but just shows the
short- and long version strings and the location on the boot server