Skip to content

Commit

Permalink
Fixed the readlink in init script
Browse files Browse the repository at this point in the history
Init script had a logic to read the target location of the
symlink using 'readlink'. But the result was not the
target of the link. Now fixed it with removing the
switch '-f' for 'readlink'

This is what seen with cirros 0.5.2
$ readlink -f /etc/dropbear
/etc/dropbear
$ readlink  /etc/dropbear
/var/run/dropbear
  • Loading branch information
stesrn committed Nov 16, 2023
1 parent 3620782 commit 02723a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/init.d/S50dropbear
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ start() {

# Handle symlinked directories
if [ -L "$dropbear_key_dir" ]; then
dropbear_key_dir=$(readlink -f "$dropbear_key_dir")
dropbear_key_dir=$(readlink "$dropbear_key_dir")
fi

# Ensure host keys are changed when instance ID changes
Expand Down

0 comments on commit 02723a4

Please sign in to comment.