test_nfs4_acls: Add test for acedup settings
[Samba.git] / selftest / ns / nsenter-helper.sh
blobf396ed4d98cd568e47b1ac5372c64a07a508d1af
1 #!/bin/sh
3 # Helper script that gets run with nsenter to manually setup a secondary shell
4 # session to a given namespace testenv. This basically just sets up the same
5 # environment variables as you normally get with selftest, for convenience.
7 if [ $# -lt 1 ] ; then
8 echo "Usage: $0 <exports-file>"
9 exit 1
12 # we get passed a exports file with all the environment variables defined
13 exports_file=$1
15 # read the exports file so the new shell has appropriate variables setup
16 # (we export rather than sourcing here so they get inherited by the subshell)
17 while read -r line ; do
18 export $line
19 # dump them for the user too
20 echo $line
21 done < $exports_file
23 echo ""
24 echo "Entered $NETBIOSNAME namespace, with above variables defined."
25 echo "Use CTRL+D or exit to leave the namespace."
26 echo ""
28 # start a shell session in the new namespace
29 $SHELL