set correct owner for SW update procedure
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
cbb1fdfd5e
commit
9d440838e9
@ -173,7 +173,14 @@ These files can be created manually:
|
|||||||
You can also use the `create-version-file.sh` helper shell script
|
You can also use the `create-version-file.sh` helper shell script
|
||||||
located in the `scripts` folder to do this.
|
located in the `scripts` folder to do this.
|
||||||
|
|
||||||
4. Run the following command to create the compressed archive
|
4. Set the Q7S user as the file owner for both files
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo chown root:root eive-obsw-stripped
|
||||||
|
sudo chown root:root obsw_version.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Run the following command to create the compressed archive
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt
|
tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt
|
||||||
|
@ -1936,6 +1936,22 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
|
|||||||
utility::handleSystemError(result, "CoreController::executeAction: Copying SW version file");
|
utility::handleSystemError(result, "CoreController::executeAction: Copying SW version file");
|
||||||
}
|
}
|
||||||
cmd.clear();
|
cmd.clear();
|
||||||
|
|
||||||
|
// Set correct permission for both files
|
||||||
|
cmd << "chmod 0755 " << obswDestPath;
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(result, "CoreController::executeAction: Copying SW permissions 0755");
|
||||||
|
}
|
||||||
|
cmd.clear();
|
||||||
|
|
||||||
|
cmd << "chmod 0644 " << obswVersionDestPath;
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(result, "CoreController::executeAction: Setting version file permission 0644");
|
||||||
|
}
|
||||||
|
cmd.clear();
|
||||||
|
|
||||||
// TODO: This takes a long time and will block the core controller.. Maybe use command executor?
|
// TODO: This takes a long time and will block the core controller.. Maybe use command executor?
|
||||||
// For now dont care..
|
// For now dont care..
|
||||||
cmd << "writeprotect " << data[0] << " " << data[1] << " 1";
|
cmd << "writeprotect " << data[0] << " " << data[1] << " 1";
|
||||||
|
@ -15,7 +15,20 @@ if [ ! -f obsw_version.txt ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir update-archive
|
||||||
|
cp eive-obsw-stripped update-archive
|
||||||
|
cp obsw_version.txt update-archive
|
||||||
|
|
||||||
|
cd update-archive
|
||||||
|
|
||||||
|
sudo chown root:root eive-obsw-stripped
|
||||||
|
sudo chown root:root obsw_version.txt
|
||||||
|
|
||||||
cmd="tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt"
|
cmd="tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt"
|
||||||
echo "Running command ${cmd} to generate compressed SW update archive."
|
echo "Running command ${cmd} to generate compressed SW update archive."
|
||||||
eval ${cmd}
|
eval ${cmd}
|
||||||
|
cp eive-sw-update.tar.xz ..
|
||||||
|
cd ..
|
||||||
|
rm -rf update-archive
|
||||||
|
|
||||||
echo "Generated eive-sw-update.tar.xz update archive."
|
echo "Generated eive-sw-update.tar.xz update archive."
|
||||||
|
Loading…
Reference in New Issue
Block a user