If you find yourself having this error when starting ipsec on openwrt:
ipsec_setup: Starting Openswan IPsec U2.6.29/K2.6.32.25…
ipsec_setup: rm: invalid option — d
ipsec_setup: BusyBox v1.15.3 (2010-11-11 22:22:00 PST) multi-call binary
ipsec_setup: Usage: rm [OPTIONS] FILE…
you can easily fix it by editing the following file: /usr/lib/ipsec/_realsetup and on line 293 change:
rm test -d `echo $subsyslock | sed -r ‘s/(^.*\/)(.*$)/\1/’` “&&” touch $subsyslock “&&”
to rm test -rf `echo $subsyslock | sed -r ‘s/(^.*\/)(.*$)/\1/’` “&&” touch $subsyslock “&&”
