Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jun 2014 19:38:09 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        User questions <freebsd-questions@freebsd.org>
Subject:   Re: Using "Cloud" drives in FreeBSD
Message-ID:  <20140622173809.GA77004@slackbox.erewhon.home>
In-Reply-To: <20140622102723.65f1da6f@scorpio>
References:  <20140622102723.65f1da6f@scorpio>

next in thread | previous in thread | raw e-mail | index | archive | help

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 machi=
ne
> 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.
>=20
> Is there anyway I can accomplish the same thing with FreeBSD?

There is a FUSE implementation for dropbox; https://github.com/arekzb/dropf=
use
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: https://github.com/mk-fg/onedr=
ive-fuse-fs

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 mo=
unt
or unmount it automatically once an ethernet connection comes up or goes do=
wn
(laptop).

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;

    #!/bin/sh
    LOGGER=3D"logger -t etherup -p daemon.notice"

    subsystem=3D$1
    ${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 dropfuse.py <dropbox.com url> /media/dropbox &
    fi

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.


Roland
--=20
R.F.Smith                                   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93  FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)

--r5Pyd7+fXNt84Ff3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJTpxSBAAoJEED21dyjijPgjUoP/2h1AUzsDiAlXVyqcrs76quL
cUP0R1vRHP7a4ASTO7aAwyrM21IMvrT5IHqngbdlWRA7Y1k90+vlP/5hn1Cp+psk
qgW/TGh8RCSyXEwZTPm/EA6559PsZVi4r4qYNNZ/qG5WjA5CUUouwiF+1V2Odv8N
efOcYLf8lFAg6Bl6bZWydZSrOf5Kb84XvGSk/HQQTnQ2rs95dVh+qq2SYasWaxUN
cpvClGlr735zXBpJtDryuOjdqHPnx0A/YdtZj3NrXrXSuEEyqRuJBk0zSvfNdcVg
VCgPoCa3Th1Zsx4H/SEfXA2liLX1FWIg1U+MFJMSdyZe36Ib9nPPLq3E+E9Oy3gG
A585tvd7onhlk2KfQE0bFXVQywnK6YNNlnV4LhbtuEsaJR++coDxvpa2WngAz2Ce
PP5BWDffQFgjz5yPxS29WRhEEeXC+pYS4id1A8ulTkunWpDdJ6OvODTJznOMMIN2
o2SqAaBcATgIvvbq7DJ7gW165Ut/fZaZTdMVisLz/513KWrXKC68zOZEeKk0vej/
/T2Vq/bRtJZiBS2u7oQ2hEPGkkrgSWDezvd7twbTiF2mmTsxruAhVf4td0NQWLVS
8UqGRlzRy8G+HVeB5zYDQa3jE3p49UQSMpsi0igdZlqXv+o0kFw06L8Hd0d7Jy86
GJL6gowLOaHa+FNh/BZN
=r7IT
-----END PGP SIGNATURE-----

--r5Pyd7+fXNt84Ff3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140622173809.GA77004>