Older Newer
Mon, 19 Dec 2005 08:51:10 . . . . XeRO?
Mon, 19 Dec 2005 08:47:07 . . . . XeRO? [Fixed some issues in the script]
Sat, 10 Dec 2005 01:48:35 . . . . 216.123.222.74 [Script does not maintain ONBOOT settings.]
Sun, 20 Nov 2005 16:37:53 . . . . p54889910.dip0.t-ipconnect.de
Mon, 15 Aug 2005 10:57:28 . . . . office.intouch.net [Adding vscfg-convert.sh to the wiki]


Changes by last author:

Changed:
echo "Usage: $0 [NAME]"
echo "Usage: $0 [NAME] <-f>"
Added:
echo "Optionally use -f to remove an already present config directory"
Changed:
source /etc/vservers/${VSNAME}.conf
source ${OLD_CONF_DIR}/${VSNAME}.conf
Changed:
if [ -f /etc/vservers/$VSNAME.sh ]
if [ -f ${OLD_CONF_DIR}/$VSNAME.sh ]
Changed:
done < /etc/vservers/$VSNAME.sh
done < ${OLD_CONF_DIR}/$VSNAME.sh
Changed:
echo "default" > ${VSBDIR}/apps/init/mark
if [ "x${ONBOOT}" == "xyes" ]; then

echo "default" > ${VSBDIR}/apps/init/mark

fi

Changed:
VSNETDEV="`echo ${VSNET} | cut -d : -f 1`"
VSNETDEV="`echo ${VSNET} | cut -d : -f 1 | egrep \"^[[:alpha:]]\" `"
Changed:
VSNETMASK="`echo ${VSNET} | cut -d : -f 2 | cut -d / -f 2`"
VSNETMASK="`echo ${VSNET} | cut -d : -f 2 | cut -d / -f 2 -s`"
Added:

echo "Update of proc/dev tree [DONE]"

Added:
OLD_CONF_DIR=/etc/vservers
Changed:
if [ -f /etc/vservers/${VSNAME}.conf -a -d /var/lib/vservers/${VSNAME} ]; then
if [ -f ${OLD_CONF_DIR}/${VSNAME}.conf ]; then
Changed:
do_parsesh ;# Convert the [NAME].sh file

do_updatevserver;# Convert proc/dev tree

do_parsesh ;# Convert the [NAME].sh file

# In case only config should be converted

# Check for /etc (in vserver) to be sure that there's really a vserver present (i.e. LVM mounted)

if [ -d ${VSROOT}/${VSNAME}/etc ]; then

do_updatevserver;# Convert proc/dev tree

else

echo "Update of proc/dev tree [FAILED]"

echo " VServer directory not found or LVM not mounted on ${VSROOT}/${VSNAME}."

echo " So no update of proc/dev tree."

fi

Added:
See also [Step-by-Step Guide 2.6] under "Migration" for info on how to manually migrate to the new config style.
Changed:
Remark from Adrian Wallaschek (to be removed once the script is fixed or checked!): for me the resulting config needed to be fixed (sorry have no time to check the script now): in /etc/vservers/<server>/interface/0/dev I found the IP address making the vserver script believe it was a VLAN config. Putting "eth0" there did the job! Enjoy!

WARNING: The above script does not observe the ONBOOT settings. If you have ONBOOT=no set in your old .conf files then you will need to modify /etc/vservers/<vs>/apps/init/mark (see [here]) so that it reads something other than 'default'.

Ulimits are currently not converted by the script.