1
0
Fork 0
mirror of https://github.com/kou029w/yama.git synced 2025-01-30 22:08:00 +00:00

Revert "feat: megabit mode"

This reverts commit eefb903a28.
This commit is contained in:
Nebel 2022-05-30 22:19:04 +09:00
parent 07d6de7eb4
commit f6e7dbfa76
10 changed files with 5 additions and 29 deletions

View file

@ -1,5 +1,4 @@
alpine-base
i2c-tools
openssh
rsync
wpa_supplicant

View file

@ -1,4 +0,0 @@
#!/sbin/openrc-run
name=megabit
command="/usr/local/bin/megabit"
pidfile="/var/run/megabit.pid"

View file

@ -1,11 +0,0 @@
#!/sbin/openrc-run
name=megabit-sync
command="/usr/local/bin/megabit-sync"
pidfile="/var/run/megabit-sync.pid"
start_pre() {
mkdir -p /mnt/tmp
mount /usr/share/megabit/tmp.img /mnt/tmp
modprobe -r g_acm_ms
modprobe g_acm_ms file=/usr/share/megabit/tmp.img
}

View file

@ -0,0 +1 @@
options g_mass_storage file=/dev/mmcblk0p1

View file

@ -0,0 +1 @@
g_mass_storage

View file

@ -1 +0,0 @@
/etc/init.d/megabit

View file

@ -1 +0,0 @@
/etc/init.d/megabit-sync

View file

@ -1,4 +0,0 @@
#!/bin/sh
export NODE_PATH=$(npm root -g)
nodemon --delay 1 --watch /tmp --signal SIGTERM --exec 'node /tmp/index.js || true' &
echo $! > /var/run/megabit.pid

View file

@ -1,3 +0,0 @@
#!/bin/sh
nodemon --delay 1 --watch /usr/share/megabit/tmp.img --signal SIGTERM --exec 'umount /mnt/tmp; mount /usr/share/megabit/tmp.img /mnt/tmp; rsync -a --delete --exclude=node_modules/ /mnt/tmp/ /tmp/' &
echo $! > /var/run/megabit-sync.pid

View file

@ -15,9 +15,8 @@ services:
- ./dist/overlay.img:/overlay.img
privileged: true
command: |
sh -exc '
sh -c '
mkdir -p /mnt/overlay
mount -a
apk add g++ linux-headers make nodejs npm python3
npm install -g megabit nodemon
mount -a \
&& apk add g++ linux-headers make nodejs npm python3
'