X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.functions;h=e75c76861b7d018064364a562e2c6711c4c68ad3;hb=93b6ce372f2e185af3cbb19d9c7620486f433496;hp=0eab27e9d00193aa1a5980fd3af32d475b260f8e;hpb=b87060ea5024f6ca357d4e2ded795b2a7c8cd35b;p=util-vserver.git diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 0eab27e..e75c768 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -1282,13 +1282,15 @@ function _namespaceCleanup done } -function loadDeviceMap +function handleDeviceMap { - local xid="$1" - local dir="$2" + local op="$1" + local xid="$2" + local dir="$3" local flags device target test -d "$dir" || return 0 + test -n "$xid" || return 0 for i in "$dir"/*; do test -d "$i" || continue @@ -1304,6 +1306,6 @@ function loadDeviceMap vdevmap_opts=( "${vdevmap_opts[@]}" ${flags:+--flags "$flags"} \ ${device:+--device "$device"} ${target:+--target "$target"} ) - $_VDEVMAP --xid "$xid" --set "${vdevmap_opts[@]}" || return $? + $_VDEVMAP --xid "$xid" "$op" "${vdevmap_opts[@]}" || return $? done }