Skip to content

Instantly share code, notes, and snippets.

@Nokius
Created May 18, 2015 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nokius/0ff117988c931c7afd14 to your computer and use it in GitHub Desktop.
Save Nokius/0ff117988c931c7afd14 to your computer and use it in GitHub Desktop.
[root@Jolla nemo]# cat /lib/systemd/system/usb-moded.service
[Unit]
Description=usb-moded USB gadget controller
DefaultDependencies=no
Wants=systemd-udev-settle.service
Requires=dbus.socket
After=local-fs.target dbus.socket systemd-udev-settle.service
Conflicts=shutdown.target
BusName=com.meego.usb_moded
[Service]
Type=notify
TimeoutSec=15
EnvironmentFile=-/var/lib/environment/usb-moded/*.conf
EnvironmentFile=-/run/usb-moded/*.conf
ExecStart=/usr/sbin/usb_moded --systemd --force-syslog $USB_MODED_ARGS
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=basic.target
[root@Jolla nemo]# cat /var/lib/environment/usb-moded/*.conf
# Start in rescue mode
USB_MODED_ARGS=-r
[root@Jolla nemo]# cat /etc/usb-moded/usb-moded.ini
[mountpoints]
mount=/dev/sdcard
[altmount]
mount=/run/user/100000/media/sdcard
[usbmode]
mode=ask
[root@Jolla nemo]# cat /run/usb-moded/*.conf
cat: /run/usb-moded/*.conf: No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment