mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-16 03:42:44 +03:00
Don't print error on missing /proc/mounts
This is useful for testing
This commit is contained in:
parent
dd7cb23515
commit
0500f71837
@ -36,8 +36,8 @@ DEFAULT_ACTIONS_FINAL=""
|
|||||||
### standard init-early functions...
|
### standard init-early functions...
|
||||||
|
|
||||||
init__expand_root() {
|
init__expand_root() {
|
||||||
local dev=$(awk '$2 == "/" {print $1}' "$ROOT"/proc/mounts)
|
local dev=$(awk '$2 == "/" {print $1}' "$ROOT"/proc/mounts 2>/dev/null)
|
||||||
local filesystem=$(awk '$2 == "/" {print $3}' "$ROOT"/proc/mounts)
|
local filesystem=$(awk '$2 == "/" {print $3}' "$ROOT"/proc/mounts 2>/dev/null)
|
||||||
local partition=$(cat "$ROOT/sys/class/block/${dev#/dev/}/partition" 2>/dev/null)
|
local partition=$(cat "$ROOT/sys/class/block/${dev#/dev/}/partition" 2>/dev/null)
|
||||||
|
|
||||||
# only support ext2/ext3/ext4 for now
|
# only support ext2/ext3/ext4 for now
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user