#!/bin/sh -e

[ -d /etc/alternatives ] || exit 0

KV_MAJOR=`/sbin/kernelversion_major`
[ -n "$KV_MAJOR" ] && [ "$KV_MAJOR" -ge 2 ] || exit 0
KV_MINOR=`/sbin/kernelversion_minor`
[ -n "$KV_MINOR" ] || exit 0

if [ "$KV_MAJOR" -eq 2 ] && [ "$KV_MINOR" -lt 4 ]; then
	[ -x /usr/bin/vconfig22 ] &&
		ln -snf /usr/bin/vconfig22 /etc/alternatives/vconfig ||
		rm -f /etc/alternatives/vconfig
else
	[ -x /usr/bin/vconfig24 ] &&
		ln -snf /usr/bin/vconfig24 /etc/alternatives/vconfig ||
		rm -f /etc/alternatives/vconfig
fi
