1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-15 11:22:43 +03:00

Don't print error on missing /proc/mounts

This is useful for testing
This commit is contained in:
Natanael Copa 2023-05-08 13:47:20 +02:00
parent dd7cb23515
commit 0500f71837

View File

@ -36,8 +36,8 @@ DEFAULT_ACTIONS_FINAL=""
### standard init-early functions...
init__expand_root() {
local dev=$(awk '$2 == "/" {print $1}' "$ROOT"/proc/mounts)
local filesystem=$(awk '$2 == "/" {print $3}' "$ROOT"/proc/mounts)
local dev=$(awk '$2 == "/" {print $1}' "$ROOT"/proc/mounts 2>/dev/null)
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)
# only support ext2/ext3/ext4 for now