mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-08 02:53:45 +08:00
Compare commits
4 Commits
0f97091e61
...
v7.46
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c44669d91 | ||
|
|
175d90aad7 | ||
|
|
e1e5f8f91d | ||
|
|
dff8abbe1e |
@@ -3,7 +3,8 @@ services:
|
|||||||
container_name: dsm
|
container_name: dsm
|
||||||
image: vdsm/virtual-dsm
|
image: vdsm/virtual-dsm
|
||||||
environment:
|
environment:
|
||||||
RAM_SIZE: "max"
|
ALLOCATE: "Y"
|
||||||
|
RAM_SIZE: "half"
|
||||||
DISK_SIZE: "max"
|
DISK_SIZE: "max"
|
||||||
CPU_CORES: "max"
|
CPU_CORES: "max"
|
||||||
devices:
|
devices:
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
"name": "Virtual DSM",
|
"name": "Virtual DSM",
|
||||||
"service": "dsm",
|
"service": "dsm",
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"RAM_SIZE": "max",
|
"ALLOCATE": "Y"
|
||||||
"DISK_SIZE": "max",
|
|
||||||
"CPU_CORES": "max"
|
|
||||||
},
|
},
|
||||||
"forwardPorts": [5000],
|
"forwardPorts": [5000],
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.dockerignore
|
.dockerignore
|
||||||
|
.devcontainer
|
||||||
.git
|
.git
|
||||||
.github
|
.github
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|||||||
5
.github/workflows/check.yml
vendored
5
.github/workflows/check.yml
vendored
@@ -22,3 +22,8 @@ jobs:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ignore: DL3008,DL3003,DL3006,DL3013
|
ignore: DL3008,DL3003,DL3006,DL3013
|
||||||
failure-threshold: warning
|
failure-threshold: warning
|
||||||
|
-
|
||||||
|
name: Validate JSON and YML files
|
||||||
|
uses: GrantBirki/json-yaml-validate@v4
|
||||||
|
with:
|
||||||
|
yaml_exclude_regex: ".*\\kubernetes\\.yml$"
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ cd /run
|
|||||||
. proc.sh # Initialize processor
|
. proc.sh # Initialize processor
|
||||||
. serial.sh # Initialize serialport
|
. serial.sh # Initialize serialport
|
||||||
. power.sh # Configure shutdown
|
. power.sh # Configure shutdown
|
||||||
. config.sh # Configure arguments
|
|
||||||
. memory.sh # Check available memory
|
. memory.sh # Check available memory
|
||||||
|
. config.sh # Configure arguments
|
||||||
. finish.sh # Finish initialization
|
. finish.sh # Finish initialization
|
||||||
|
|
||||||
trap - ERR
|
trap - ERR
|
||||||
|
|||||||
@@ -1,16 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
lastmsg=""
|
||||||
path="/run/shm/msg.html"
|
path="/run/shm/msg.html"
|
||||||
|
|
||||||
if [ -f "$path" ] && [ -s "$path" ]; then
|
refresh() {
|
||||||
echo -n "s: " && cat "$path"
|
|
||||||
fi
|
[ ! -f "$path" ] && return 0
|
||||||
|
[ ! -s "$path" ] && return 0
|
||||||
|
|
||||||
|
msg=$(< "$path")
|
||||||
|
msg="${msg%$'\n'}"
|
||||||
|
|
||||||
|
[ -z "$msg" ] && return 0
|
||||||
|
[[ "$msg" == "$lastmsg" ]] && return 0
|
||||||
|
|
||||||
|
lastmsg="$msg"
|
||||||
|
echo "s: $msg"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
refresh
|
||||||
|
|
||||||
inotifywait -m "$path" |
|
inotifywait -m "$path" |
|
||||||
while read -r fp event fn; do
|
while read -r fp event fn; do
|
||||||
case "${event,,}" in
|
case "${event,,}" in
|
||||||
"modify"* ) echo -n "s: " && cat "$path" ;;
|
"modify"* ) refresh ;;
|
||||||
"delete_self" ) echo "c: vnc" ;;
|
"delete_self" ) echo "c: vnc" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user