On 2017-03-20, Vagrant Cascadian wrote: > And even more improved with support for ipv6 with path (untested), and > fixed the comment for ipv4 with path:
And merged ipv4 and ipv6 with path into a single case statement, if you'd prefer that: diff --git a/debian/nbd-client.initrd b/debian/nbd-client.initrd index 680e4ee..ed7c7d1 100644 --- a/debian/nbd-client.initrd +++ b/debian/nbd-client.initrd @@ -61,6 +61,16 @@ case "$nbdroot" in nbdsrv="${nbdroot%,*}" nbdport="${nbdroot#*,}" ;; + /*|*:/*) + # [ipv6]:/path or ipv4:/path + nbdsrv=${nbdroot%\]*} + nbdsrv=${nbdsrv#\[} + nbdsrv=${nbdsrv%%/*} + nbdsrv=${nbdsrv%%:} + nbdpath=${nbdroot#\[$nbdsrv\]} + nbdpath=${nbdpath#$nbdsrv} + nbdpath=${nbdpath#:} + ;; \[*\]*) # [ipv6]:port/path nbdsrv=${nbdroot%\]*} Apologies for the flood of patches; once I got started, it got under my skin and I had to make things "right". :) live well, vagrant
signature.asc
Description: PGP signature