8 print "Setting prefix = $prefix\n";
11 # Setting temporarily for Thierry's test environment
16 my $slice="$prefix"."_netflow";
17 my $slicedir="/vservers/$slice";
19 # Subtest #1 Create new vsys entry
20 print "Creating entries...\t";
22 my $vsys_entry="#!/bin/bash\n\ncat /etc/passwd";
23 my $vsys_entry_acl = "$slice";
25 open ACL,">/vsys/test.acl" || die ("Could not create acl for test entry.");
26 print ACL $vsys_entry_acl;
29 open FIL,">/vsys/test" || die ("Could not create test entry.");
30 print FIL $vsys_entry;
33 chmod 0755,"/vsys/test";
35 # Check if it has shown up
38 (-p "/vservers/$slice/vsys/test.in") || die ("in file didn't show up in the slice");
39 (-p "/vservers/$slice/vsys/test.out") || die ("out file didn't show up in the slice");
41 # OK, SUBTEST #1 SUCCEEDED
42 print "[SUCCESS] The new entried appeared OK\n";
46 print "Multiple-connection test...\t";
47 mkdir ("/vservers/$slice/support");
48 system("cp vsys_conctest /vservers/$slice/support");
49 system("su -c '/support/vsys_conctest $slice' $slice -");
50 ($? && die ("[FAILED] Multiple-connection test failed\n"));
53 # OK, SUBTEST #2 SUCCEEDED
57 unlink "/vsys/test.acl";
60 (-f "$slicedir/test.in" || -f "$slicedir/test.out") && die ("cleanup failed");