add user package

This commit is contained in:
Serghey Rodin 2012-07-30 22:48:54 +03:00
commit 9a1fde8cb3
12 changed files with 470 additions and 11 deletions

View file

@ -121,7 +121,10 @@ gen_password() {
# Package existance check
is_package_valid() {
if [ ! -e "$VESTA/data/packages/$package.pkg" ]; then
if [ -z "$1" ]; then
pkg_dir="$VESTA/data/packages"
fi
if [ ! -e "$pkg_dir/$package.pkg" ]; then
echo "Error: package $package not exist"
log_event "$E_NOTEXIST $EVENT"
exit $E_NOTEXIST