File: west.sh

package info (click to toggle)
libreswan 5.2-2.3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 81,644 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (24 lines) | stat: -rwxr-xr-x 1,069 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# rhbz#1313816
mkdir /tmp/rhbz1313816
rm -f /etc/ipsec.d/*.*
# should abort, not crash, due to missing nss
ipsec pluto --rundir /tmp/rhbz1313816 --nofork --stderrlog --log-no-time

# rhbz#1041576 start pluto in dir not owned by root
# should not fail with "pluto: unable to create lock dir:"
# not using /tmp or /var/tmp/ due to specialness of parent dir in test
/testing/guestbin/swan-prep --nokeys
rm -rf /var/cache/otheruser
mkdir -p /var/cache/otheruser/var/run/pluto /var/cache/otheruser/etc
cp /etc/ipsec.d/*.* /var/cache/otheruser/etc/
mv /etc/ipsec.conf /var/cache/otheruser/etc/
chown -R bin:bin /var/cache/otheruser/var/run/pluto /var/cache/otheruser/etc
chmod -R 755 /var/cache/otheruser
ipsec pluto --rundir /var/cache/otheruser/var/run/pluto --secretsfile /var/cache/otheruser/etc/ipsec.secrets
# give pluto time to start and create its socket and pid files
sleep 3
# show it is running
ipsec whack --rundir /var/cache/otheruser/var/run/pluto --briefstatus
# shut it down
ipsec whack --rundir /var/cache/otheruser/var/run/pluto  --shutdown
echo "initdone"