root@OpenWrt:/etc/init.d# ./mount-onedrive enabe
/etc/rc.common: /etc/rclone.env: line 2: 62270: not found
/etc/rc.common: /etc/rclone.env: line 7: u@h:: not found
/etc/rc.common: /etc/rclone.env: line 14: 62270: not found
Should it be 'import' or 'source' or something like that?
I think this may be because the rclone binary is located in /usr/bin/rclone? Although I do not understand why just launching it with full path /usr/bin/rclone would not work then? Or could there be another explanation why this export is needed?
Does this look safe? I read that if init.d scripts fail it can be dangerous in certain circumstances:
WARNING OpenWrt initscripts will be run while building OpenWrt images (when installing packages in what will become a ROM image) in the host system (right now, for actions “enable ” and “disable ”). They must not fail, or have undesired side-effects in that situation. When being run by the build system, environment variable ${IPKG_INSTROOT} will be set to the working directory being used. On the “target system”, that environment variable will be empty/unset. Refer to “/lib/functions.sh” and also to “/etc/rc.common” in package “base-files” for the nasty details.