ns-wrapper (271B)
1 #!/bin/sh 2 3 if [ $# -lt 2 ]; 4 then 5 printf "usage: %s ns cmd\n" "$(basename $0)" >&2 6 exit 1 7 fi 8 9 # nroot is checked by ns-path 10 nroot="$1" 11 cmd="$2" 12 13 path="$(ns-path -n $nroot $cmd)" 14 [ $? -gt 0 ] && exit 1 15 16 printf "#!/bin/sh\nns-chroot \"%s\" %s \"\$@\"\n" "$nroot" "$path" 17