You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
418 B

#!/bin/sh
uvol_init() {
local metasz freesz totalsz
uvol detect
metasz="$(uvol size .meta 2>/dev/null)"
[ "$((metasz))" -gt 0 ] && return
totalsz="$(uvol total)"
freesz="$(uvol free)"
metasz="$((totalsz / 10240))"
[ "$metasz" -lt 4194304 ] && metasz=4194304
[ "$metasz" -gt "$freesz" ] && return
uvol create .meta "$metasz" rw
uvol up .meta
}
uci -q get fstab.@uvol[0].initialized >/dev/null || uvol_init