summaryrefslogtreecommitdiffstats
path: root/server/bin/oglivecli
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-03-04 09:08:36 +0100
committerRamón M. Gómez <ramongomez@us.es>2020-03-04 09:08:36 +0100
commit54d7ca27c01767abc5951a932131c6ae18dad584 (patch)
tree8f52fe6469ac8f006129ba596d1b475e9b3a0644 /server/bin/oglivecli
parent0c0ba58bd101038870c796aabc355b13a03ff5e3 (diff)
#965: `oglivecli install` uses shorter directory names.
Diffstat (limited to 'server/bin/oglivecli')
-rwxr-xr-xserver/bin/oglivecli11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/bin/oglivecli b/server/bin/oglivecli
index 8af5937f..0f3728a3 100755
--- a/server/bin/oglivecli
+++ b/server/bin/oglivecli
@@ -32,7 +32,7 @@
#@version 1.1.0 - Initial version.
#@author Ramón M. Gómez - ETSII Univ. Sevilla
#@date 2016-12-05
-#@version 1.1.1b - Use global functions.
+#@version 1.1.1b - Use reduced directory names.
#@author Ramón M. Gómez - ETSII Univ. Sevilla
#@date 2020-01-17
#*/ ##
@@ -270,9 +270,11 @@ function install() {
[ ! -w $(dirname $INFOFILE) ] && raiseError access "Configuration directory."
[ ! -w $TFTPDIR ] && raiseError access "Installation directory."
[ -z "$(file -b $OGLIVEFILE | grep "ISO.*ogClient")" ] && raiseError access "File is not an ogLive ISO image."
- # Working directory (ogLive-Distribution-KernelVersion-Architecture-CodeRevision).
+ # Working directory:
+ # 64-bit: ogLive-KernelVersion-rCodeRelease
+ # 32-bit: ogLive-KernelVersion-i386-rCodeRelease
OGLIVEDIST="$(echo $OGLIVEFILE|cut -f2 -d-)"
- OGLIVEREV="${OGLIVEFILE##*-}"; OGLIVEREV="${OGLIVEREV%.*}"
+ OGLIVEREV="${OGLIVEFILE##*-}"; OGLIVEREV="${OGLIVEREV%%.*}"
OGLIVEKRNL="$(echo $OGLIVEFILE|cut -f3- -d-)"; OGLIVEKRNL="${OGLIVEKRNL%-$OGLIVEREV.*}"
OGLIVEARCH="$(echo $OGLIVEFILE|awk -F- '{print $(NF-1)}')"
case "$OGLIVEARCH" in
@@ -281,7 +283,8 @@ function install() {
*) # 32-bit by default.
OGLIVEARCH="i386" ;;
esac
- OGLIVEDIR="$TFTPDIR/$DEFOGLIVE-$OGLIVEDIST-${OGLIVEKRNL%%-*}-$OGLIVEARCH-$OGLIVEREV"
+ OGLIVEDIR="$TFTPDIR/$DEFOGLIVE-${OGLIVEKRNL%%-*}-$OGLIVEARCH-$OGLIVEREV"
+ OGLIVEDIR="${OGLIVEDIR/amd64-/}"
# Get current or default Samba key.
OGINITRD=$OGLIVEDIR/oginitrd.img
[ ! -r $OGINITRD ] && OGINITRD=$TFTPDIR/$DEFOGLIVE/oginitrd.img