-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Based on information in S01config in steamlink-sdk https://github.com/ValveSoftware/steamlink-sdk/blob/master/rootfs/etc/init.d/startup/S01config Icon is from https://icon-icons.com/icon/pendrive-usb/78535 by Juliia Osadcha, Free for commercial use, can NOT be sold. Attribution not required but appreciated.
- Loading branch information
0 parents
commit 3f33c37
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# tar -c -f archive.tar --owner=0 --group=0 . | ||
|
||
name=usbmounttoggle | ||
tar -zcvf $name.tgz --owner=0 --group=0 $name | ||
|
||
echo '' | ||
echo now place $name.tgz on to USB drive in directory: | ||
echo '' | ||
echo ' \steamlink\apps # Windows' | ||
echo ' /steamlink/apps # Linux/Unix' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
# NOTE this files needs the executable bit set | ||
# toc.txt expects a binary for "run" argument, "run=sh run.sh" does NOT work | ||
|
||
# Simple mount/unmount toggle script | ||
# Simplistic, only mounts first partition, not like https://github.com/ValveSoftware/steamlink-sdk/blob/master/rootfs/etc/init.d/startup/S01config | ||
|
||
MOUNT_DISK=/mnt/disk | ||
device=/dev/block/sda1 | ||
|
||
do_mount() | ||
{ | ||
mount ${device} ${MOUNT_DISK} | ||
} | ||
|
||
do_umount() | ||
{ | ||
umount ${MOUNT_DISK} | ||
} | ||
|
||
if [ ! -d ${MOUNT_DISK} ] | ||
then | ||
mkdir -p ${MOUNT_DISK} | ||
fi | ||
|
||
#df ${MOUNT_DISK} | grep ${MOUNT_DISK}\$ && do_umount | ||
|
||
# output never seen on Steam Link, so no need to 2>/dev/null | ||
df ${MOUNT_DISK} | grep ${MOUNT_DISK}\$ | ||
status=$? | ||
if [ $status -eq 0 ] | ||
then | ||
do_umount | ||
else | ||
do_mount | ||
fi | ||
# TODO look at switching icons/toc.txt around to display a different icon so mount status can be seen easily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name=USBMountToggle | ||
icon=icon.png | ||
run=run.sh |