Skip to content

Commit

Permalink
simple-updater: Patch updater script for get logs
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Castello <[email protected]>
  • Loading branch information
microhobby committed Jun 8, 2024
1 parent 62acf88 commit aee1f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cookbook/recipes-wsl/profile/profile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

echo "Welcome to the Torizon WSL 2 v0.0.8"
echo "Welcome to the Torizon WSL 2 v0.0.9"

export PATH

Expand Down Expand Up @@ -39,11 +39,12 @@ boot.ps1

# check the return code from the boot
if [ $? -eq 0 ] ; then
mkdir -p ~/.log
# run the telemetry in the background
sudo -E /opt/telemetry/telemetry > /var/log/telemetry.log 2>&1 & disown
sudo -E /opt/telemetry/telemetry > ~/.log/telemetry.log 2>&1 & disown

# run the updater in the background
sudo -E /opt/updater/updater.ps1 > /var/log/updater.log 2>&1 & disown
sudo -E /opt/updater/updater.ps1 > ~/.log/updater.log 2>&1 & disown

echo "Success"
else
Expand Down
2 changes: 1 addition & 1 deletion cookbook/recipes-wsl/simple-update/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ execSync(
// copy the boot script to the rootfs
execSync(
`echo ${USER_PASSWD} | sudo -E -S ` +
`cp ${_path}/boot.ps1 ${IMAGE_MNT_ROOT}/opt/updater/`,
`cp ${_path}/updater.ps1 ${IMAGE_MNT_ROOT}/opt/updater/`,
{
shell: "/bin/bash",
stdio: "inherit",
Expand Down

0 comments on commit aee1f1f

Please sign in to comment.