From owner-freebsd-questions@FreeBSD.ORG Sun Jun 22 17:38:18 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1743C96 for ; Sun, 22 Jun 2014 17:38:18 +0000 (UTC) Received: from smtp-vbr13.xs4all.nl (smtp-vbr13.xs4all.nl [194.109.24.33]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53AF02754 for ; Sun, 22 Jun 2014 17:38:17 +0000 (UTC) Received: from slackbox.erewhon.home (slackbox.xs4all.nl [83.162.243.5]) by smtp-vbr13.xs4all.nl (8.13.8/8.13.8) with ESMTP id s5MHcAoQ017242 for ; Sun, 22 Jun 2014 19:38:10 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.home (Postfix, from userid 1001) id EBDEB12441; Sun, 22 Jun 2014 19:38:09 +0200 (CEST) Date: Sun, 22 Jun 2014 19:38:09 +0200 From: Roland Smith To: User questions Subject: Re: Using "Cloud" drives in FreeBSD Message-ID: <20140622173809.GA77004@slackbox.erewhon.home> Mail-Followup-To: User questions References: <20140622102723.65f1da6f@scorpio> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <20140622102723.65f1da6f@scorpio> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 17:38:18 -0000 --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 /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--