Using "Cloud" drives in FreeBSD

Roland Smith rsmith at
Sun Jun 22 17:38:18 UTC 2014

On Sun, Jun 22, 2014 at 10:27:23AM -0400, Jerry wrote:
> I am using both "OneDrive" and "Dropbox" cloud drives on my Win-8.1 machine
> to store data. I love the fact that I can use them as real drives without
> having to go through hoops to mount them and gain access to them.
> Is there anyway I can accomplish the same thing with FreeBSD?

There is a FUSE implementation for dropbox;
It is not in the ports tree. It probably requires devel/py-fusefs since it is
written in Python.

A similar thing seems to exist for onedrive:

Depending on how your computer connects to the internet, you can mount it
using a startup script (on a desktop), or use a script called by devd to mount
or unmount it automatically once an ethernet connection comes up or goes down

E.g. on a laptop I might have the following in /etc/devd/conf;

    notify 0 {
            match "system"          "IFNET";
            match "type"            "LINK_UP";
            match "subsystem"       "(re0|wlan0)";
            action "/usr/local/etc/rc.d/etherup $subsystem";

The etherup script contains;

    LOGGER="logger -t etherup -p daemon.notice"

    ${LOGGER} "The '$subsystem' link has come up. Acquiring IP address."
    service dhclient quietstart $subsystem
    ${LOGGER} "Starting firewall."
    service pf onestart
    ${LOGGER} "Synchronize time."
    service ntpd onestart

You could easily add the dropbox and onedrive stuff to that:

    if [ ! -e /var/run/dropfuse ]; then
        mkdir -p /media/dropbox
        touch /var/run/dropfuse
        python < url> /media/dropbox &

Of course you'd have to create multiple different directories if you'd like to
mount different dropbox URLs.

And you probably want to write a scripts than kills the dropfuse script and
removes the file in /var/run if devd gets a LINK_DOWN on  event.

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93  FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the freebsd-questions mailing list