From: Maxime Hadjinlian Date: Wed, 28 May 2014 07:46:20 +0000 (+0200) Subject: dropbear: fix missing directory with systemd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe823b63741ba8eca70a534207d655f5affa927c;p=buildroot.git dropbear: fix missing directory with systemd The current SysV startup script create a directory which is necessary for dropbear to correctly work. This creation is not done with systemd. Instead of both init creating the directory, we add the creation of this directory to the INSTALL_TARGET_CMDS to make sure it's present. [Peter: use make syntax for TARGET_DIR as pointed out by Thomas] Signed-off-by: Maxime Hadjinlian Signed-off-by: Peter Korsgaard --- diff --git a/package/dropbear/S50dropbear b/package/dropbear/S50dropbear index a343b9e1c0..f36165ae48 100644 --- a/package/dropbear/S50dropbear +++ b/package/dropbear/S50dropbear @@ -10,10 +10,6 @@ start() { DROPBEAR_ARGS="$DROPBEAR_ARGS -R" echo -n "Starting dropbear sshd: " - # Make sure dropbear directory exists - if [ ! -d /etc/dropbear ] ; then - mkdir -p /etc/dropbear - fi umask 077 start-stop-daemon -S -q -p /var/run/dropbear.pid \ --exec /usr/sbin/dropbear -- $DROPBEAR_ARGS diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk index 2ac6211988..3a391694e6 100644 --- a/package/dropbear/dropbear.mk +++ b/package/dropbear/dropbear.mk @@ -85,6 +85,7 @@ define DROPBEAR_INSTALL_TARGET_CMDS for f in $(DROPBEAR_TARGET_BINS); do \ ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \ done + mkdir -p $(TARGET_DIR)/etc/dropbear endef $(eval $(autotools-package))