ns-gencapchrootallow (259B)
1 #!/bin/sh 2 3 if [ $# -lt 1 ]; 4 then 5 printf "usage: %s root\n" "$(basename $0)" >&2 6 exit 1 7 fi 8 9 nsroot="$(ns-root "$1")" 10 [ $? -gt 0 ] && exit $? 11 12 cd "$nsroot" 13 for ns in $(ls -1d */); 14 do 15 printf "%s/%s @ns\n" "$nsroot" "$(printf "%s\n" "$ns" | tr -d "/")" 16 done 17