From 3f33c373206eb5fc867db9eb72a240d322b202bf Mon Sep 17 00:00:00 2001 From: Chris Clark Date: Thu, 6 Jun 2019 20:08:16 -0700 Subject: [PATCH] :cake: Initial commit :cake: 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. --- packit.sh | 12 ++++++++++++ usbmounttoggle/icon.png | Bin 0 -> 5602 bytes usbmounttoggle/run.sh | 37 +++++++++++++++++++++++++++++++++++++ usbmounttoggle/toc.txt | 3 +++ 4 files changed, 52 insertions(+) create mode 100644 packit.sh create mode 100644 usbmounttoggle/icon.png create mode 100644 usbmounttoggle/run.sh create mode 100644 usbmounttoggle/toc.txt diff --git a/packit.sh b/packit.sh new file mode 100644 index 0000000..4b882d3 --- /dev/null +++ b/packit.sh @@ -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' diff --git a/usbmounttoggle/icon.png b/usbmounttoggle/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9e574522e06ad7f46a9739875bd431dc4c52cb5f GIT binary patch literal 5602 zcmZ{o2T)Vrv&U}=O={>Jj1)ymKx#m0P^#1j2vVhlmI$GWkbp=P1f+u?NDEC+sR}_+ z;0FQ<2#T0UFDgwmAmEF?d2i+Ur(35Tf zzyaMwSOtJE1OTkN0|2rB00eL)T{b%O0Hde*MHKMo?^FJ~CWr1}!I?OP0st$|UjqR} zC4vCJV`qvou#f!stu*fLC-0jBZe^R_KW`>1not!_-n}L9rJswz9$djZ0h4kGR?>g? z(LW%l(W`D0|JA;-GXy z=j`lJY;W1|_E(ww?xW|Fqp06SokAUNK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k70%xrMZ2_t4%N@M*0AN}C%5Tddc9tbMw9QN93{wF7xZkWo(_Oad zaceWAdAx$tdlM**#Bu?`Hj1C{Nd!{MGXjgzc@?pxk=-V9r4#Z@ZLzT5O4Yb zs34Rz6cEY^D(d#iT1XWYR}VXt9)qW=GcH0c;PJ>kON3ZYmZ ze1u1cH((m%;p=Vb;fwJKkW^RHP}Ee=lBAbZS3syMD631_(9I8z$03!JA|fIbF@I^g z(P>3&i0^W*Y8zcq@UNo1Us#YQ5{bfkg#~#B>fIvNTn*Zk>L`ajISHIYa^Z;Y=W z9#B(OA&*4aM(D`r10do!S_ZJb3fqbGPLjQqSVuHN!Q8;hl-&HB$f_?Q`FJJmU zI+pfy3Q$(nR8v(`)l$F68(YB_54<^u? zz6FX(VYoo7$F)!;FOQHwY$z_oI~=2A9Oi2kY=1#X8KI@7^lv2%b%chdf=3A66YCLj fO+ndBLsRXXnj(FLc)4&jx;|iPd/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 diff --git a/usbmounttoggle/toc.txt b/usbmounttoggle/toc.txt new file mode 100644 index 0000000..6a82531 --- /dev/null +++ b/usbmounttoggle/toc.txt @@ -0,0 +1,3 @@ +name=USBMountToggle +icon=icon.png +run=run.sh