maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Best way to make a startup script? (https://talk.maemo.org/showthread.php?t=92902)

alci 2014-03-24 16:16

Re: Best way to make a startup script?
 
Quote:

Originally Posted by meemorph (Post 1418314)
@hopey
What filesystem are you using? May be a driver module is missing, it should be added to the dependencies of the service. I am using btrfs like SailfishOS.

If you mount it manually with the script, its to late for the tracker. You can do a
Code:

tracker-control -es
and wait a few minutes. But its only a workaround for pictures and music, not for ambiences.

My SDCard is formatted using btrfs. Is yours also using btrfs ?

Leinad 2014-03-24 17:55

Re: Best way to make a startup script?
 
BIG thanks too meemorph, now everything works great again!
  • ambiances are used from sdcard
  • images are visible in gallery
  • changes in app-order are persistant

i kept everything very simple, this is my config for ext4:

mount-sd.custom.sh
Code:

#!/bin/bash

ACTION=$1

if [ "$ACTION" = "add" ]; then
    mount /dev/mmcblk1p1 /mnt/sd
    mount -o bind /mnt/sd/.home /home/nemo
    mount -o bind /mnt/sd/.android /data/sdcard
else
  umount /data/sdcard
  umount /home/nemo
  umount /mnt/sd
fi

mount-custom.service
Code:

[Unit]
Description=Handle custom sdcard
After=local-fs.target
RequiresMountsFor=/home

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/mount-sd.custom.sh add
ExecStop=/usr/sbin/mount-sd.custom.sh remove

[Install]
WantedBy=multi-user.target

Great! :)

Penguin 2014-03-24 18:56

Re: Best way to make a startup script?
 
This looks absolutely great!

hopey 2014-03-25 06:40

Re: Best way to make a startup script?
 
Ok got it working using Leinads script. I don't know what made the difference. I'm using ext4 too.

Thanks everyone!

meemorph 2014-03-30 08:58

Quote:

Originally Posted by hopey (Post 1418394)
Ok got it working using Leinads script. I don't know what made the difference. I'm using ext4 too.

Thanks everyone!

I would say ext4 is not equal btrfs ;-).


All times are GMT. The time now is 02:52.

vBulletin® Version 3.8.8