Hi Stephen and Alberto,

On 13-11-26 07:47 AM, Alberto Gonzalez Iniesta wrote:
> On Thu, Nov 07, 2013 at 09:46:24PM -0800, Stephen Gildea wrote:
>> Package: openvpn
>> Version: 2.3.2-5
>> Tags: patch
>>
>> This patch moves all openvpn /var/run files down into a subdirectory.
>> This change is in support of running openvpn in a chroot: it allows
>> that subdirectory to be moved into the chroot tree and still be
>> soft-linked from the real /var/run (and thus visible to this script).
>>
>> This patch is a subset of the patch in bug 614036.  I hope this small
>> and more focused patch will be easier to review and that you will thus
>> be able to apply it now.  Although it is a trivial change, this patch
>> is invasive in that it touches lines throughout the script.  Getting
>> it merged upstream would greatly ease the burden of carrying forward
>> the patch in 614036 until you have a chance to consider its more
>> complicated behavior.
> 
> Hi Stephen,
> 
> Thanks for your patches. I'll be happy to apply 729030's patch as soon
> as I get a clean upgrade path. Changing the location of pid files in the
> init script while VPNs are running will not work well, and that will
> happen in the first upgrade of the package with this patch applied.

I applied this patch while I had 6 VPN clients running. To cope with the
pid/status files relocation I did this:

# Create destination dir
mkdir /var/run/openvpn

# Move .pid and .status files
for f in $(ls /var/run/openvpn.*.pid /var/run/openvpn.*.status
2>/dev/null); do
  mv "$f" "/var/run/openvpn/$(basename $f | sed 's/^openvpn\.//')"
done

# Fix sendsigs.omit.d links
for f in /var/run/openvpn/*.pid; do
  b="$(basename $f)"
  [ -e "/run/sendsigs.omit.d/openvpn.$b" ] || \
    ln -sf "$f" "/run/sendsigs.omit.d/openvpn.$b"
done

This worked well and the status and restart init actions worked well.
Maybe this could go in a post-install script?

Thanks,
Simon


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to