refs #1134 Fix bug that in installer creates oglive_info.json with root
parent
992a52edbd
commit
8c4310d85e
|
@ -346,7 +346,7 @@ function install() {
|
|||
|
||||
find -L "$OGLIVEDIR" -type d -exec chmod 755 {} \; >/dev/null 2>&1 || { echo "{\"error\": \"CHMOD_FAILED\", \"message\": \"Failed to change permissions for directories in $OGLIVEDIR.\"}"; exit 500; }
|
||||
find -L "$OGLIVEDIR" -type f -exec chmod 644 {} \; >/dev/null 2>&1 || { echo "{\"error\": \"CHMOD_FAILED\", \"message\": \"Failed to change permissions for files in $OGLIVEDIR.\"}"; exit 500; }
|
||||
sudo chown -R :opengnsys "$OGLIVEDIR" >/dev/null 2>&1 || { echo "{\"error\": \"CHOWN_FAILED\", \"message\": \"Failed to change ownership for $OGLIVEDIR.\"}"; exit 500; }
|
||||
|
||||
|
||||
OGSQFS="$OGLIVEDIR/ogclient.sqfs"
|
||||
trap "exit 0" SIGINT
|
||||
|
@ -383,7 +383,7 @@ function install() {
|
|||
}' > "$OGLIVEDIR/oglive_info.json"
|
||||
|
||||
[ ! -f "$OGLIVEDIR/oglive_info.json" ] && { echo "{\"error\": \"JSON_CREATION_FAILED\", \"message\": \"Failed to create oglive_info.json.\"}"; exit 500; }
|
||||
|
||||
sudo chown -R :opengnsys "$OGLIVEDIR" >/dev/null 2>&1 || { echo "{\"error\": \"CHOWN_FAILED\", \"message\": \"Failed to change ownership for $OGLIVEDIR.\"}"; exit 500; }
|
||||
JSON_OUTPUT=$(jq -n \
|
||||
--arg id "$OGLIVEID" \
|
||||
--arg dist "$OGLIVEDIST" \
|
||||
|
|
Loading…
Reference in New Issue