diff --git a/config/xen-image/README b/config/xen-image/README index 531867311..a23491fc9 100644 --- a/config/xen-image/README +++ b/config/xen-image/README @@ -21,5 +21,5 @@ other usefull commands from the Dom0: This script can also build a Citrix XenCenter xva image. (Need xz-aware xen version. Tested with Citrix Xen Server 6.2.5 beta) -- run "XEN_IMG_TYPE=xva sh xen-image-maker.sh" to build an xva image. -- import the vm with "xe vm-import file=ipfire.xfa" +- run "XEN_IMG_TYPE=xva bash xen-image-maker.sh" to build an xva image. +- import the vm with "xe vm-import file=ipfire.xva" diff --git a/lfs/icinga b/lfs/icinga index 691d83d93..ab562f24c 100644 --- a/lfs/icinga +++ b/lfs/icinga @@ -112,7 +112,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --prefix=/usr \ --libexecdir=/usr/lib/icinga/plugins \ --with-nagios-user=nobody \ - --with-nagios-group=nobody + --with-nagios-group=nobody \ + --without-ipv6 cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && make $(MAKETUNING) # Install core diff --git a/lfs/nagios b/lfs/nagios index a9cef536f..868272bb3 100644 --- a/lfs/nagios +++ b/lfs/nagios @@ -102,7 +102,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_SRC) && tar xfz $(DIR_DL)/nagios-plugins-1.4.13.tar.gz cd $(DIR_SRC)/nagios-plugins* && ./configure --prefix=/usr \ --libexecdir=/usr/lib/nagios \ - --with-nagios-user=nobody --with-nagios-group=nobody + --with-nagios-user=nobody --with-nagios-group=nobody \ + --without-ipv6 cd $(DIR_SRC)/nagios-plugins* && make cd $(DIR_SRC)/nagios-plugins* && make install chown -R nobody:nobody /var/nagios diff --git a/src/installer/main.c b/src/installer/main.c index ad388e6a9..9262a400c 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -104,6 +104,37 @@ static int newtWinOkCancel(const char* title, const char* message, int width, in const char* btn_txt_ok, const char* btn_txt_cancel) { int ret = 1; + unsigned int btn_width_ok = strlen(btn_txt_ok); + unsigned int btn_width_cancel = strlen(btn_txt_cancel); + + // Maybe make the box wider to fix both buttons inside + unsigned int min_width = btn_width_ok + btn_width_cancel + 5; + if (width < min_width) + width = min_width; + + unsigned int btn_pos_ok = (width / 3) - (btn_width_ok / 2) - 1; + unsigned int btn_pos_cancel = (width * 2 / 3) - (btn_width_cancel / 2) - 1; + + // Move buttons a bit if they overlap + while ((btn_pos_ok + btn_width_ok + 5) > btn_pos_cancel) { + // Move the cancel button to the right if there is enough space left + if ((btn_pos_cancel + btn_width_cancel + 2) < width) { + ++btn_pos_cancel; + continue; + } + + // Move the OK button to the left if possible + if (btn_pos_ok > 1) { + --btn_pos_ok; + continue; + } + + // If they still overlap, we cannot fix the situtation + // and break. Should actually never get here, because we + // adjust the width of the window earlier. + break; + } + newtCenteredWindow(width, height, title); newtComponent form = newtForm(NULL, NULL, 0); @@ -112,12 +143,8 @@ static int newtWinOkCancel(const char* title, const char* message, int width, in newtTextboxSetText(textbox, message); newtFormAddComponent(form, textbox); - unsigned int btn_width_ok = strlen(btn_txt_ok); - unsigned int btn_width_cancel = strlen(btn_txt_cancel); - - newtComponent btn_ok = newtButton((width / 3) - (btn_width_ok / 2) - 2, height - 4, btn_txt_ok); - newtComponent btn_cancel = newtButton((width * 2 / 3) - (btn_width_cancel / 2) - 2, height - 4, - btn_txt_cancel); + newtComponent btn_ok = newtButton(btn_pos_ok, height - 4, btn_txt_ok); + newtComponent btn_cancel = newtButton(btn_pos_cancel, height - 4, btn_txt_cancel); newtFormAddComponents(form, btn_ok, btn_cancel, NULL);