From 3ca984e13e8bf4f9289550160f09633d84f84d91 Mon Sep 17 00:00:00 2001 From: Marcel Samyn Date: Sun, 19 Apr 2015 15:03:56 +0200 Subject: [PATCH] Dyamically get the `freedombone` command --- src/freedombone-prep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-prep b/src/freedombone-prep index 4328c791..572764fe 100755 --- a/src/freedombone-prep +++ b/src/freedombone-prep @@ -243,7 +243,7 @@ $SUDO sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $MICROSD_MOUNT_POINT/$RO $SUDO sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf # copy the commands to the card -$SUDO cp -f /usr/local/bin/freedombone* $MICROSD_MOUNT_POINT/$ROOTFS/usr/local/bin/ +$SUDO cp -f $(which freedombone)* $MICROSD_MOUNT_POINT/$ROOTFS/usr/local/bin/ if [ ! -f $MICROSD_MOUNT_POINT/$ROOTFS/usr/local/bin/freedombone ]; then echo 'There was a problem with writing freedombone commands to the SD card' exit 8736