8 print "Setting prefix = $prefix\n";
14 # Setting temporarily for Thierry's test environment
17 my $slice="$prefix"."_netflow";
18 my $slicedir="/vservers/$slice";
20 # Subtest #1 Create new vsys entry
21 print "Creating entries...\t";
23 my $vsys_entry="#!/bin/bash\n\ncat /etc/passwd";
24 my $vsys_entry_acl = "$slice";
26 open ACL,">/vsys/test.acl" || die ("Could not create acl for test entry.");
27 print ACL $vsys_entry_acl;
30 open FIL,">/vsys/test" || die ("Could not create test entry.");
31 print FIL $vsys_entry;
34 chmod 0755,"/vsys/test";
36 # Check if it has shown up
39 (-p "/vservers/$slice/vsys/test.in") || die ("in file didn't show up in the slice");
40 (-p "/vservers/$slice/vsys/test.out") || die ("out file didn't show up in the slice");
42 # OK, SUBTEST #1 SUCCEEDED
43 print "[SUCCESS] The new entried appeared OK\n";
47 print "Multiple-connection test...\t";
48 mkdir ("/vservers/$slice/support");
49 system("cp vsys_conctest /vservers/$slice/support");
50 system("su -c '/support/vsys_conctest $slice' $slice -");
51 ($? && die ("[FAILED] Multiple-connection test failed\n"));
54 # OK, SUBTEST #2 SUCCEEDED
58 unlink "/vsys/test.acl";
61 (-f "$slicedir/test.in" || -f "$slicedir/test.out") && die ("cleanup failed");