From 820e7d502f15d1c84d7e757fc55984bea4c31e05 Mon Sep 17 00:00:00 2001 From: Peter Steenbergen Date: Sun, 4 Nov 2018 17:17:56 +0100 Subject: [PATCH] MycroftOS: Buildroot: Check for /.mycroft and if not exist create it - This is a work around for #9 untill I figure out what exactly is causing it. --- .../rootfs-overlay/etc/init.d/S90mycroft_prepare | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/buildroot-external/rootfs-overlay/etc/init.d/S90mycroft_prepare b/buildroot-external/rootfs-overlay/etc/init.d/S90mycroft_prepare index 7fe316ac..0553ae9a 100755 --- a/buildroot-external/rootfs-overlay/etc/init.d/S90mycroft_prepare +++ b/buildroot-external/rootfs-overlay/etc/init.d/S90mycroft_prepare @@ -18,6 +18,16 @@ start() { mkdir /var/log/mycroft/ fi fi + + # Check if /.mycroft exist already and if not + # create a symbolic link to /root/.mycroft + if [[ ! -w /.mycroft/ ]] ; then + # Creating .mycroft symlink + printf "Creating /.mycroft/ symlink" + if [[ ! -d /.mycroft/ ]] ; then + ln -s /root/.mycroft /.mycroft + fi + fi } case "$1" in start)