#!/bin/sh #----------------------------------------------------------------------------- # /var/install/bin/openvz-edit-vm.cui - edit VM # # Last Update: $Id:$ # # Copyright (c) 2006-2009 the eisfair team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #----------------------------------------------------------------------------- scriptfile="$3" . /var/install/include/cuilib . /var/install/include/cuivmlib #============================================================================ # global constants #============================================================================ #============================================================================ # main window hooks #============================================================================ #---------------------------------------------------------------------------- # init routine (entry point of all shellrun.cui based programs) # $p2 --> desktop window handle #---------------------------------------------------------------------------- function init() { local win="$p2" # setup main window cui_window_new "$win" 0 0 0 0 $[$CWS_POPUP + $CWS_CAPTION + $CWS_STATUSBAR + $CWS_MAXIMIZED] && mainwin="$p2" if cuivm_valid_handle $mainwin then cui_window_setcolors "$mainwin" "DESKTOP" cui_window_settext "$mainwin" "OpenVZ VE administration " cui_window_setrstatustext "$mainwin" "V1.0.0" cui_window_create "$mainwin" cuivm_create_terminal "$mainwin" "${scriptfile}" "Execute operation" cui_window_quit 0 fi cui_return 0 } #---------------------------------------------------------------------------- # main routines (always at the bottom of the file) #---------------------------------------------------------------------------- cui_init cui_run exit 0