Skip to content

Commit

Permalink
chore: use su instead of sudo in dpkg postinst
Browse files Browse the repository at this point in the history
Signed-off-by: ComixHe <[email protected]>
  • Loading branch information
ComixHe committed Nov 20, 2024
1 parent 124bc72 commit 4048fba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions debian/linglong-bin.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

case "$1" in
configure)
sudo -u deepin-linglong ll-cli migrate || true
sudo -u deepin-linglong rm /var/lib/linglong/state.json 2>/dev/null || true
# deepin-linglong doesn't has a login shell, use /bin/sh to execute 'migrate'
su -s /bin/sh -c "ll-cli migrate" deepin-linglong 2>/dev/null || true
rm /var/lib/linglong/state.json 2>/dev/null || true
;;
*) ;;
esac
Expand Down

0 comments on commit 4048fba

Please sign in to comment.