• 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5
GDRIVE OCAMLFUSE
#1
Buon giorno al forum, 
ho un quesito: monto i miei Google drive con ocamlfuse ed uno (sempre lo stesso "gDrive-pippi") lo devo montare ogni volta manualmente da terminale (va su liscio senza storie), mentre gli altri li trovo già belli pronti. In fase di boot nessuno dei drive dà problemi di montaggio. Ho predisposto, secondo quanto trovato su vari siti, questa procedura:

/ect/fstab/
# /dev/sda3
UUID=596010b8-51b9-4192-994a-966e3d16542a /        ext4      rw,relatime,data=ordered 0 1
# /dev/sda5
UUID=3e0609f7-0dcb-49f8-a7ba-b1021c42a377 none      swap      defaults,pri=-2 0 0
gdfuse#gDrive-pippi  /mnt/gDrive-pippi    fuse    uid=1000,gid=1000,allow_other,user,_netdev    0      0
gdfuse#gDrive-pioandrea /mnt/gDrive-pioandrea  fuse    uid=1000,gid=1000,allow_other,user,_netdev    0      0
gdfuse#gDrive-linkki  /mnt/gDrive-linkki    fuse    uid=1000,gid=1000,allow_other,user,_netdev    0      0
gdfuse#gDrive-abitare  /mnt/gDrive-abitare    fuse    uid=1000,gid=1000,allow_other,user,_netdev    0      0

/home/pippi/bin
#!/bin/bash
while true; do
  # check to see if there is a connection by pinging a Google server
  if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then
    # if connected, mount the drive and break the loop
    google-drive-ocamlfuse /mnt/gDrive-pippi;
    google-drive-ocamlfuse /mnt/gDrive-pioandrea;
    google-drive-ocamlfuse /mnt/gDrive-linkki;
    google-drive-ocamlfuse /mnt/gDrive-abitare; break;
  else
    # if not connected, wait for one second and then check again
    sleep 8
  fi

/usr/bin/gdfuse
#!/bin/bash
su pippi -l -c "google-drive-ocamlfuse -label $1 $*"
su bambu -l -c "google-drive-ocamlfuse -label $1 $*" (secondo utente)
exit 0

/home/pippi/.gdfuse/default/config
acknowledge_abuse=false
apps_script_format=desktop
apps_script_icon=
async_upload_queue=false
async_upload_threads=10
autodetect_mime=true
cache_directory=
......................

/home/pippi/.gdfuse/label/config
google-drive-ocamlfuse -label gDrive-pippi /mnt/gDrive-pippi
google-drive-ocamlfuse -label gDrive-pioandrea /mnt/gDrive-pioandrea
google-drive-ocamlfuse -label gDrive-abitare /mnt/gDrive-abitare
google-drive-ocamlfuse -label gDrive-linkki /mnt/gDrive-linkki

/etc/systemd/system/gdrive.service
[Unit]
After=networking.service
[Service]
ExecStart=/usr/local/bin/mount-gdrive.sh
[Install]
WantedBy=default.target

/usr/local/bin/mount-gdrive.sh
#!/bin/sh
su pippi -l -c "google-drive-ocamlfuse -label gDrive-pippi /mnt/gDrive-pippi"
su pippi -l -c "google-drive-ocamlfuse -label gDrive-pioandrea /mnt/gDrive-pioandrea"
su pippi -l -c "google-drive-ocamlfuse -label gDrive-linkki /mnt/gDrive-linkki"
su pippi -l -c "google-drive-ocamlfuse -label gDrive-abitare /mnt/gDrive-abitare"

su bambu -l -c "google-drive-ocamlfuse -label gDrive-bambu /mnt/gDrive-bambu"
su bambu -l -c "google-drive-ocamlfuse -label gDrive-monica /mnt/gDrive-monica"


/home/pippi/.profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
...
#mount | grep "${HOME}/GoogleDrive" >/dev/null || /usr/bin/google-drive-ocamlfuse "${HOME}/gdrive"&
Questa ultima l'ho messa a commento perchè non pare cambiare nulla se la attivo ... ho fatto anche prove modificando "gdrive" con i vare /mnt/gDrive-xxxx, ma non vedo cambiamenti

/home/pippi/bin
#!/bin/bash
while true; do
  # check to see if there is a connection by pinging a Google server
  if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then
    # if connected, mount the drive and break the loop
    google-drive-ocamlfuse /mnt/gDrive-pippi;
    google-drive-ocamlfuse /mnt/gDrive-pioandrea;
    google-drive-ocamlfuse /mnt/gDrive-linkki;
    google-drive-ocamlfuse /mnt/gDrive-abitare; break;
  else
    # if not connected, wait for one second and then check again
    sleep 8
  fi
  
ls /home/pippi/.gdfuse
default  gDrive-abitare  gDrive-linkki  gDrive-pioandrea  gDrive-pippi  label  mnt

ls /mnt
gDrive-abitare  gDrive-linkki  gDrive-pioandrea  gDrive-pippi



Inoltre non capisco perchè elementary os (stessa configurazione) mi segni i gdrive come dischi e deepin come cartelle (anche se poi dalle info mi dice dischi). Spero di essermi spiegato bene ed aver dato tutti i dati necessari. Grazie!
  Cita messaggio
#2
Ho risolto trasformando /home/pippi/bin così:

/home/pippi/bin
#!/bin/bash

sh -c "google-drive-ocamlfuse /mnt/gDrive-pippi"
sh -c "google-drive-ocamlfuse /mnt/gDrive-pioandrea"
sh -c "google-drive-ocamlfuse /mnt/gDrive-abitare"
sh -c "google-drive-ocamlfuse /mnt/gDrive-linkki"

Magari a qualcuno interessa ;-)
  Cita messaggio


Vai al forum:


Utenti che stanno guardando questa discussione: 1 Ospite(i)