Skip to content

Commit

Permalink
d/landscape-common.postinst: create and set read-write permissions for
Browse files Browse the repository at this point in the history
/var/lib/landscape-sysinfo.cache to prevent permissions errors when
executing update-motd.
  • Loading branch information
Perfect5th committed Nov 25, 2023
1 parent cda050d commit b7cadfd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/landscape-common.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ case "$1" in
WRAPPER=/usr/share/landscape/landscape-sysinfo.wrapper
PROFILE_LOCATION=/etc/profile.d/50-landscape-sysinfo.sh
UPDATE_MOTD_LOCATION=/etc/update-motd.d/50-landscape-sysinfo
STAMP_LOCATION=/var/lib/landscape/landscape-sysinfo.cache

touch $STAMP_LOCATION
chown landscape:root $STAMP_LOCATION
chmod 666 $STAMP_LOCATION

if [ "$RET" = "Cache sysinfo in /etc/motd" ]; then
rm -f $PROFILE_LOCATION 2>/dev/null || true
ln -sf $WRAPPER $UPDATE_MOTD_LOCATION
Expand Down

0 comments on commit b7cadfd

Please sign in to comment.