#!/bin/sh # Copyright (c) 2002-2007 by Rack-Soft, LLC # Copyright (c) 2002-2007 by 4PSA (www.4psa.com) # All rights reserved # For use with SWSoft Virtuozzo / Open Source OpenVZ ONLY # This program will allow VPSes to access /dev/zap/ # Required for Asterisk conference functions # Modified: $DateTime: 2007/10/05 19:48:18 $ # Revision: $Revision: #4 $ with $Change: 28641 $ # Add here the list of VPS that you want to allow to access /dev/zap VZLIST="101" for VZ in ${VZLIST};do if [ -f /etc/sysconfig/vz-scripts/${VZ}.conf ];then echo "Start processing for VPS with id ${VZ}..." devices="" for module in `ls -l /dev/zap | awk '{print $6}'`;do devices="${devices} --devices c:196:${module}:rw" done vzctl set ${VZ} ${devices} --save echo else echo "VPS with id ${VZ} does not exist, skipping..." fi done