This patch supercedes the previous one by moving the functionality for relocating files into the make system.
Darryl L. Pierce
2010-Feb-23 14:52 UTC
[Ovirt-devel] [PATCH] Moves all ovirt-config-* scripts to /usr/libexec.
This is to reinforce with the user that the scripts are not meant to be used at the commandline individually. The spec file and Makefile are both fixed to change the installation location. The ovirt-functions file now contains a variable which points to the installation directory, which is used inside of all scripts which call out to other scripts. Updates the make system to use makefiles and to install the files there. Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- Makefile.am | 97 +++++---------------------------- configure.ac | 6 ++ images/Makefile.am | 20 +++++++ kinit/Makefile.am | 20 +++++++ nodeadmin/Makefile.am | 61 +++++++++++++++++++++ ovirt-node.spec.in | 83 +++++++++++------------------ scripts/Makefile.am | 46 ++++++++++++++++ scripts/ovirt | 2 +- scripts/ovirt-awake | 2 +- scripts/ovirt-config-boot | 2 +- scripts/ovirt-config-boot-wrapper | 4 +- scripts/ovirt-config-collectd | 2 +- scripts/ovirt-config-hostname | 2 +- scripts/ovirt-config-iscsi | 2 +- scripts/ovirt-config-logging | 2 +- scripts/ovirt-config-networking | 2 +- scripts/ovirt-config-password | 2 +- scripts/ovirt-config-setup | 2 +- scripts/ovirt-config-storage | 2 +- scripts/ovirt-config-uninstall | 2 +- scripts/ovirt-config-view-logs | 2 +- scripts/ovirt-early | 6 +- scripts/ovirt-firstboot | 18 +++--- scripts/ovirt-install-node-stateful | 2 +- scripts/ovirt-install-node-stateless | 2 +- scripts/ovirt-post | 2 +- scripts/ovirt-process-config | 2 +- scripts/ovirt-uninstall-node-stateful | 2 +- scripts/persist | 4 +- scripts/unpersist | 4 +- tools/Makefile.am | 23 ++++++++ 31 files changed, 256 insertions(+), 172 deletions(-) create mode 100644 images/Makefile.am create mode 100644 kinit/Makefile.am create mode 100644 nodeadmin/Makefile.am create mode 100644 scripts/Makefile.am create mode 100644 tools/Makefile.am diff --git a/Makefile.am b/Makefile.am index 7798d09..da992ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,90 +17,19 @@ OVIRT_CACHE_DIR ?= $(HOME)/ovirt-cache -SUBDIRS = \ - gptsync \ - recipe - -EXTRA_DIST = \ - .gitignore \ - ovirt-node.spec \ - ovirt-node.spec.in \ - images/grub-splash.xpm.gz \ - images/syslinux-vesa-splash.jpg \ - nodeadmin/__init__.py \ - nodeadmin/adddomain.py \ - nodeadmin/addhost.py \ - nodeadmin/addpool.py \ - nodeadmin/addvolume.py \ - nodeadmin/changehost.py \ - nodeadmin/configscreen.py \ - nodeadmin/createmeter.py \ - nodeadmin/createnetwork.py \ - nodeadmin/createuser.py \ - nodeadmin/definenet.py \ - nodeadmin/destroynetwork.py \ - nodeadmin/domainconfig.py \ - nodeadmin/halworker.py \ - nodeadmin/hostconnect.py \ - nodeadmin/hostmenu.py \ - nodeadmin/libvirtworker.py \ - nodeadmin/listdomains.py \ - nodeadmin/listnetworks.py \ - nodeadmin/listpools.py \ - nodeadmin/mainmenu.py \ - nodeadmin/menuscreen.py \ - nodeadmin/migratedomain.py \ - nodeadmin/networkconfig.py \ - nodeadmin/netmenu.py \ - nodeadmin/nodeadmin.py \ - nodeadmin/nodemenu.py \ - nodeadmin/poolconfig.py \ - nodeadmin/removedomain.py \ - nodeadmin/removehost.py \ - nodeadmin/removepool.py \ - nodeadmin/removevolume.py \ - nodeadmin/startdomain.py \ - nodeadmin/startpool.py \ - nodeadmin/stopdomain.py \ - nodeadmin/stoppool.py \ - nodeadmin/storagemenu.py \ - nodeadmin/undefinenetwork.py \ - nodeadmin/userworker.py \ - nodeadmin/utils.py \ - nodeadmin/volumeconfig.py \ - scripts/collectd.conf.in \ - scripts/node-config \ - scripts/ovirt \ - scripts/ovirt-awake \ - scripts/ovirt-config-boot \ - scripts/ovirt-config-boot-wrapper \ - scripts/ovirt-config-collectd \ - scripts/ovirt-config-hostname \ - scripts/ovirt-config-iscsi \ - scripts/ovirt-config-logging \ - scripts/ovirt-config-networking \ - scripts/ovirt-config-password \ - scripts/ovirt-config-setup \ - scripts/ovirt-config-storage \ - scripts/ovirt-config-uninstall \ - scripts/ovirt-config-view-logs \ - scripts/ovirt-early \ - scripts/ovirt-firstboot \ - scripts/ovirt-functions \ - scripts/ovirt-install-node-stateful \ - scripts/ovirt-install-node-stateless \ - scripts/persist \ - scripts/unpersist \ - scripts/ovirt-post \ - scripts/ovirt-process-config \ - scripts/ovirt-uninstall-node-stateful \ - tools/create-ovirt-iso-nodes \ - tools/edit-livecd \ - tools/livecd-iso-to-iscsi \ - tools/livecd-rpms \ - tools/livecd-setauth \ - kinit/ovirt-kinit \ - logrotate/ovirt-logrotate \ +SUBDIRS = \ + gptsync \ + images \ + kinit \ + nodeadmin \ + recipe \ + scripts \ + tools + +EXTRA_DIST = \ + ovirt-node.spec \ + ovirt-node.spec.in \ + logrotate/ovirt-logrotate \ logrotate/ovirt-logrotate.conf DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz diff --git a/configure.ac b/configure.ac index 7786d26..551dafc 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,12 @@ test x"$ac_ct_CC:$CFLAGS" = 'xgcc:-g -O2' \ && CFLAGS="$CFLAGS -Wshadow -Wall -Werror" AC_CONFIG_FILES([Makefile + images/Makefile + kinit/Makefile + nodeadmin/Makefile + scripts/Makefile + tools/Makefile + scripts/collectd.conf nodeadmin/setup.py gptsync/Makefile recipe/Makefile diff --git a/images/Makefile.am b/images/Makefile.am new file mode 100644 index 0000000..60347a8 --- /dev/null +++ b/images/Makefile.am @@ -0,0 +1,20 @@ +# Copyright (C) 2010 Red Hat, Inc. +# +# 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; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +EXTRA_DIST = \ + grub-splash.xpm.gz \ + syslinux-vesa-splash.jpg diff --git a/kinit/Makefile.am b/kinit/Makefile.am new file mode 100644 index 0000000..2ac6ca2 --- /dev/null +++ b/kinit/Makefile.am @@ -0,0 +1,20 @@ +# Copyright (C) 2010 Red Hat, Inc. +# +# 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; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +EXTRA_DIST = \ + ovirt-kinit + diff --git a/nodeadmin/Makefile.am b/nodeadmin/Makefile.am new file mode 100644 index 0000000..11c7e91 --- /dev/null +++ b/nodeadmin/Makefile.am @@ -0,0 +1,61 @@ +# Copyright (C) 2010 Red Hat, Inc. +# +# 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; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +EXTRA_DIST = \ + adddomain.py \ + addhost.py \ + addpool.py \ + addvolume.py \ + changehost.py \ + configscreen.py \ + createmeter.py \ + createnetwork.py \ + createuser.py \ + definenet.py \ + destroynetwork.py \ + domainconfig.py \ + halworker.py \ + hostconnect.py \ + hostmenu.py \ + __init__.py \ + libvirtworker.py \ + listdomains.py \ + listnetworks.py \ + listpools.py \ + mainmenu.py \ + menuscreen.py \ + migratedomain.py \ + netmenu.py \ + networkconfig.py \ + nodeadmin.py \ + nodemenu.py \ + poolconfig.py \ + removedomain.py \ + removehost.py \ + removepool.py \ + removevolume.py \ + setup.py \ + startdomain.py \ + startpool.py \ + stopdomain.py \ + stoppool.py \ + storagemenu.py \ + undefinenetwork.py \ + userworker.py \ + utils.py \ + volumeconfig.py + diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in index 3d8d100..d67b089 100644 --- a/ovirt-node.spec.in +++ b/ovirt-node.spec.in @@ -53,9 +53,7 @@ ExclusiveArch: %{ix86} x86_64 %define app_root %{_datadir}/%{name} %description -Provides a series of daemons and support utilities to allow an -oVirt Node to interact with the oVirt Server. This package -should only be installed on the oVirt Node machine. +Provides a series of daemons and support utilities for hypervisor distribution. %package tools Summary: oVirt Node tools for building and running an oVirt Node image @@ -84,37 +82,17 @@ make %{?ovirt_cache_dir: OVIRT_CACHE_DIR=%{ovirt_cache_dir}} \ %install %{__rm} -rf %{buildroot} make install DESTDIR=%{buildroot} -# FIXME move all installs into makefile -%{__install} -d -m0755 %{buildroot}%{_sbindir} +%{__install} -d -m0755 %{buildroot}%{app_root} +%{__install} -d -m0755 %{buildroot}%{_initrddir} +%{__install} -d -m0755 %{buildroot}%{_libexecdir} %{__install} -d -m0755 %{buildroot}%{_sysconfdir} -%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/chkconfig.d +%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/cron.hourly %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig %{__install} -d -m0755 %{buildroot}%{mgmt_scripts_dir} -%{__install} -d -m0755 %{buildroot}%{_initrddir} -%{__install} -d -m0755 %{buildroot}%{app_root} %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/cron.d -%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/cron.hourly %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/logrotate.d %{__install} -d -m0755 %{buildroot}%{python_sitelib}/nodeadmin -%{__install} -p -m0644 scripts/node-config %{buildroot}%{_sysconfdir}/sysconfig -%{__install} -p -m0755 scripts/ovirt-config-boot %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-boot-wrapper %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-collectd %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-hostname %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-iscsi %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-logging %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-networking %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-password %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-setup %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-storage %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-config-uninstall %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/ovirt-process-config %{buildroot}%{_sbindir} -%{__install} -D -m0755 scripts/ovirt-install-node-stateless %{buildroot}%{_sbindir} -%{__install} -D -m0755 scripts/ovirt-config-view-logs %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/persist %{buildroot}%{_sbindir} -%{__install} -p -m0755 scripts/unpersist %{buildroot}%{_sbindir} - %{__install} -p -m0644 nodeadmin/__init__.py %{buildroot}%{python_sitelib}/nodeadmin %{__install} -p -m0644 nodeadmin/configscreen.py %{buildroot}%{python_sitelib}/nodeadmin %{__install} -p -m0644 nodeadmin/menuscreen.py %{buildroot}%{python_sitelib}/nodeadmin @@ -155,12 +133,13 @@ make install DESTDIR=%{buildroot} #%{__install} -p -m0755 gptsync/showpart %{buildroot}%{_sbindir} # in Makefile now -%{__install} -p -m0755 scripts/ovirt-functions %{buildroot}%{_initrddir} +%{__install} -p -m0755 scripts/node-config %{buildroot}%{_sysconfdir}/sysconfig + %{__install} -p -m0755 scripts/ovirt-awake %{buildroot}%{_initrddir} %{__install} -p -m0755 scripts/ovirt-early %{buildroot}%{_initrddir} -%{__install} -p -m0755 scripts/ovirt-firstboot %{buildroot}%{_initrddir} %{__install} -p -m0755 scripts/ovirt %{buildroot}%{_initrddir} %{__install} -p -m0755 scripts/ovirt-post %{buildroot}%{_initrddir} +%{__install} -p -m0755 scripts/ovirt-firstboot %{buildroot}%{_initrddir} %{__install} -p -m0644 scripts/collectd.conf.in %{buildroot}%{_sysconfdir} @@ -200,16 +179,16 @@ ln -s ovirt-release %{buildroot}/etc/system-release # default ovirt-config-setup menu options %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-setup.d -%{__ln_s} ../..%{_sbindir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"00_Disk Partitioning" -%{__ln_s} ../..%{_sbindir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"05_Administrator Password" -%{__ln_s} ../..%{_sbindir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"10_Set Hostname" -%{__ln_s} ../..%{_sbindir}/ovirt-config-iscsi %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"12_iSCSI Initiator Setup" -%{__ln_s} ../..%{_sbindir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"15_Networking Setup" -%{__ln_s} ../..%{_sbindir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"30_Logging Setup" -%{__ln_s} ../..%{_sbindir}/ovirt-config-collectd %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"35_Collectd Setup" -%{__ln_s} ../..%{_sbindir}/ovirt-config-view-logs %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"90_View logs" -%{__ln_s} ../..%{_sbindir}/ovirt-config-boot-wrapper %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"98_Local install and reboot" -%{__ln_s} ../..%{_sbindir}/ovirt-config-uninstall %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"99_Uninstall node" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"00_Disk Partitioning" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"05_Administrator Password" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"10_Set Hostname" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-iscsi %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"12_iSCSI Initiator Setup" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"15_Networking Setup" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"30_Logging Setup" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-collectd %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"35_Collectd Setup" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-view-logs %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"90_View logs" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-boot-wrapper %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"98_Local install and reboot" +%{__ln_s} ../..%{_libexecdir}/ovirt-config-uninstall %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"99_Uninstall node" # ovirt-early vendor hook dir %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-early.d @@ -288,18 +267,19 @@ fi # end i386 bits %{app_root}/syslinux-vesa-splash.jpg -%{_sbindir}/ovirt-config-boot -%{_sbindir}/ovirt-config-boot-wrapper -%{_sbindir}/ovirt-config-collectd -%{_sbindir}/ovirt-config-iscsi -%{_sbindir}/ovirt-config-hostname -%{_sbindir}/ovirt-config-logging -%{_sbindir}/ovirt-config-networking -%{_sbindir}/ovirt-config-password -%{_sbindir}/ovirt-config-setup -%{_sbindir}/ovirt-config-storage -%{_sbindir}/ovirt-config-uninstall -%{_sbindir}/ovirt-config-view-logs +%{_libexecdir}/ovirt-functions +%{_libexecdir}/ovirt-config-boot +%{_libexecdir}/ovirt-config-boot-wrapper +%{_libexecdir}/ovirt-config-collectd +%{_libexecdir}/ovirt-config-iscsi +%{_libexecdir}/ovirt-config-hostname +%{_libexecdir}/ovirt-config-logging +%{_libexecdir}/ovirt-config-networking +%{_libexecdir}/ovirt-config-password +%{_libexecdir}/ovirt-config-setup +%{_libexecdir}/ovirt-config-storage +%{_libexecdir}/ovirt-config-uninstall +%{_libexecdir}/ovirt-config-view-logs %{_sbindir}/ovirt-process-config %{_sbindir}/ovirt-install-node-stateless %{_sbindir}/gptsync @@ -312,7 +292,6 @@ fi %{_initrddir}/ovirt-firstboot %{_initrddir}/ovirt %{_initrddir}/ovirt-post -%attr(0644,root,root) %{_initrddir}/ovirt-functions %config %{_sysconfdir}/cron.hourly/ovirt-kinit %{_sysconfdir}/ovirt-early.d diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 0000000..daf512c --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1,46 @@ +# Copyright (C) 2010 Red Hat, Inc. +# +# 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; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +EXTRA_DIST = \ + node-config \ + ovirt-awake \ + ovirt-early \ + ovirt \ + ovirt-post \ + ovirt-firstboot + +dist_sbin_SCRIPTS = \ + ovirt-install-node-stateless \ + ovirt-process-config \ + persist \ + unpersist + +dist_libexec_SCRIPTS = \ + ovirt-functions \ + ovirt-config-boot \ + ovirt-config-boot-wrapper \ + ovirt-config-collectd \ + ovirt-config-hostname \ + ovirt-config-iscsi \ + ovirt-config-logging \ + ovirt-config-networking \ + ovirt-config-password \ + ovirt-config-setup \ + ovirt-config-storage \ + ovirt-config-uninstall \ + ovirt-config-view-logs + diff --git a/scripts/ovirt b/scripts/ovirt index d8d52cc..25b9860 100755 --- a/scripts/ovirt +++ b/scripts/ovirt @@ -11,7 +11,7 @@ # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions prog=ovirt VAR_SUBSYS_OVIRT=/var/lock/subsys/$prog diff --git a/scripts/ovirt-awake b/scripts/ovirt-awake index 55db140..edef186 100755 --- a/scripts/ovirt-awake +++ b/scripts/ovirt-awake @@ -30,7 +30,7 @@ # config: /etc/sysconfig/node-config . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions prog=ovirt-early NODE_CONFIG=/etc/sysconfig/node-config diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot index fb956f3..d13dad2 100755 --- a/scripts/ovirt-config-boot +++ b/scripts/ovirt-config-boot @@ -17,7 +17,7 @@ # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 diff --git a/scripts/ovirt-config-boot-wrapper b/scripts/ovirt-config-boot-wrapper index 89f0fc0..118c59b 100755 --- a/scripts/ovirt-config-boot-wrapper +++ b/scripts/ovirt-config-boot-wrapper @@ -3,7 +3,7 @@ # Wrapper function to make sure the user wishes to continue before # rebooting the system -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions rc=0 while true; do @@ -26,7 +26,7 @@ continuing." fi if ask_yes_or_no "Do you wish to continue ([Y]es/[N]o)?"; then mount_live \ - && /usr/sbin/ovirt-config-boot /live "${bootparams}" + && /usr/libexec/ovirt-config-boot /live "${bootparams}" rc=$? break else diff --git a/scripts/ovirt-config-collectd b/scripts/ovirt-config-collectd index 1474bf5..af0770c 100755 --- a/scripts/ovirt-config-collectd +++ b/scripts/ovirt-config-collectd @@ -3,7 +3,7 @@ # Configures the collectd daemon. # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 diff --git a/scripts/ovirt-config-hostname b/scripts/ovirt-config-hostname index deb81bd..00d4214 100755 --- a/scripts/ovirt-config-hostname +++ b/scripts/ovirt-config-hostname @@ -3,7 +3,7 @@ # Configures the hostname file based on kernel cmdline or user prompt # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 diff --git a/scripts/ovirt-config-iscsi b/scripts/ovirt-config-iscsi index 8e1bbaf..621729e 100755 --- a/scripts/ovirt-config-iscsi +++ b/scripts/ovirt-config-iscsi @@ -3,7 +3,7 @@ # Configures the hostname file based on kernel cmdline or user prompt # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 diff --git a/scripts/ovirt-config-logging b/scripts/ovirt-config-logging index d8e5c95..f0f4040 100755 --- a/scripts/ovirt-config-logging +++ b/scripts/ovirt-config-logging @@ -3,7 +3,7 @@ # Configures the rsyslog daemon. # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking index ec154c2..18234c8 100755 --- a/scripts/ovirt-config-networking +++ b/scripts/ovirt-config-networking @@ -3,7 +3,7 @@ # Iterates over the list of network devices on the node and prompts the user # to configure each. -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/scripts/ovirt-config-password b/scripts/ovirt-config-password index e9789f8..cc45413 100755 --- a/scripts/ovirt-config-password +++ b/scripts/ovirt-config-password @@ -3,7 +3,7 @@ # Set the root password and others # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 diff --git a/scripts/ovirt-config-setup b/scripts/ovirt-config-setup index 4010828..145e568 100755 --- a/scripts/ovirt-config-setup +++ b/scripts/ovirt-config-setup @@ -3,7 +3,7 @@ # Entry point for configuring an oVirt node when running in standalone mode. -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions # symlinked scripts for menu options, link name is menu label CONFIG_DIR=/etc/ovirt-config-setup.d diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index be22ef6..529a5f4 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -6,7 +6,7 @@ # All sizes are in megabytes # -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/scripts/ovirt-config-uninstall b/scripts/ovirt-config-uninstall index 820eead..b8faa7b 100755 --- a/scripts/ovirt-config-uninstall +++ b/scripts/ovirt-config-uninstall @@ -6,7 +6,7 @@ # Destroys the HostVG volume group and logical volumes. # -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/scripts/ovirt-config-view-logs b/scripts/ovirt-config-view-logs index 70c5229..2faa92e 100755 --- a/scripts/ovirt-config-view-logs +++ b/scripts/ovirt-config-view-logs @@ -1,7 +1,7 @@ #!/bin/bash # -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/scripts/ovirt-early b/scripts/ovirt-early index 23c4f6e..d901afb 100755 --- a/scripts/ovirt-early +++ b/scripts/ovirt-early @@ -11,7 +11,7 @@ # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions prog=ovirt-early VAR_SUBSYS_OVIRT_EARLY=/var/lock/subsys/$prog @@ -147,7 +147,7 @@ configure_management_interface() { "ovirt") configure_ovirt_management_nic $bootif if [ -n "$init" ]; then - ovirt-config-storage AUTO + /usr/libexec/ovirt-config-storage AUTO # initial configuration storage, after /config creation ovirt_store_config \ /etc/sysconfig/network-scripts/ifcfg-* \ @@ -155,7 +155,7 @@ configure_management_interface() { if [ $upgrade = 1 ]; then # local disk installation for managed mode mount_live - ovirt-config-boot /live "$bootparams" + /usr/libexec/ovirt-config-boot /live "$bootparams" fi fi ;; diff --git a/scripts/ovirt-firstboot b/scripts/ovirt-firstboot index b992909..fe8564c 100755 --- a/scripts/ovirt-firstboot +++ b/scripts/ovirt-firstboot @@ -25,7 +25,7 @@ ## Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions prog=ovirt-firstboot lockfile=/var/lock/subsys/$prog @@ -46,17 +46,17 @@ start () chkconfig collectd off if is_auto_install; then - ovirt-config-storage AUTO - ovirt-config-hostname AUTO - ovirt-config-networking AUTO - ovirt-config-logging AUTO - ovirt-config-collectd AUTO - ovirt-config-password AUTO + /usr/libexec/ovirt-config-storage AUTO + /usr/libexec/ovirt-config-hostname AUTO + /usr/libexec/ovirt-config-networking AUTO + /usr/libexec/ovirt-config-logging AUTO + /usr/libexec/ovirt-config-collectd AUTO + /usr/libexec/ovirt-config-password AUTO fi if is_upgrade; then mount_live - ovirt-config-boot /live "$OVIRT_BOOTPARAMS" no + /usr/libexec/ovirt-config-boot /live "$OVIRT_BOOTPARAMS" no disable_firstboot reboot return @@ -65,7 +65,7 @@ start () if is_firstboot; then plymouth --hide-splash - ovirt-config-setup -x < /dev/console + /usr/libexec/ovirt-config-setup -x < /dev/console plymouth --show-splash fi diff --git a/scripts/ovirt-install-node-stateful b/scripts/ovirt-install-node-stateful index d16b42d..3c123ef 100755 --- a/scripts/ovirt-install-node-stateful +++ b/scripts/ovirt-install-node-stateful @@ -3,7 +3,7 @@ PHYS_HOST=physical.priv.ovirt.org MGMT_HOST=management.priv.ovirt.org -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions PATH=$PATH:/sbin:/usr/sbin ME=$(basename "$0") diff --git a/scripts/ovirt-install-node-stateless b/scripts/ovirt-install-node-stateless index cceb048..d58820c 100755 --- a/scripts/ovirt-install-node-stateless +++ b/scripts/ovirt-install-node-stateless @@ -1,6 +1,6 @@ #!/bin/bash -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions PATH=$PATH:/sbin:/usr/sbin ME=$(basename "$0") diff --git a/scripts/ovirt-post b/scripts/ovirt-post index 951d108..70ed3c4 100755 --- a/scripts/ovirt-post +++ b/scripts/ovirt-post @@ -11,7 +11,7 @@ # Source functions library . /etc/init.d/functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions prog=ovirt-post VAR_SUBSYS_OVIRT_POST=/var/lock/subsys/$prog diff --git a/scripts/ovirt-process-config b/scripts/ovirt-process-config index 877c412..6011cd7 100755 --- a/scripts/ovirt-process-config +++ b/scripts/ovirt-process-config @@ -5,7 +5,7 @@ # configuration file. It then restarts the networking service # and saves the configuration files. -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/scripts/ovirt-uninstall-node-stateful b/scripts/ovirt-uninstall-node-stateful index 5dd03ba..ca5b50f 100755 --- a/scripts/ovirt-uninstall-node-stateful +++ b/scripts/ovirt-uninstall-node-stateful @@ -1,6 +1,6 @@ #!/bin/bash -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions PATH=$PATH:/sbin:/usr/sbin ME=$(basename "$0") diff --git a/scripts/persist b/scripts/persist index 85a022e..a6818da 100755 --- a/scripts/persist +++ b/scripts/persist @@ -19,9 +19,9 @@ # also available at http://www.gnu.org/copyleft/gpl.html. # # Convenience wrapper to give access to the ovirt_store_config -# function in /etc/init.d/ovirt-functions +# function in /usr/libexec/ovirt-functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/scripts/unpersist b/scripts/unpersist index b0df524..62ed87d 100755 --- a/scripts/unpersist +++ b/scripts/unpersist @@ -19,9 +19,9 @@ # also available at http://www.gnu.org/copyleft/gpl.html. # # Convenience wrapper to give access to the ovirt_store_config -# function in /etc/init.d/ovirt-functions +# function in /usr/libexec/ovirt-functions -. /etc/init.d/ovirt-functions +. /usr/libexec/ovirt-functions ME=$(basename "$0") warn() { printf '%s: %s\n' "$ME" "$*" >&2; } diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..1b4e427 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,23 @@ +# Copyright (C) 2010 Red Hat, Inc. +# +# 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; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +EXTRA_DIST = \ + create-ovirt-iso-nodes \ + edit-livecd \ + livecd-iso-to-iscsi \ + livecd-rpms \ + livecd-setauth -- 1.6.6
Maybe Matching Threads
- Refactor ovirt-node code base for inclusion in Fedora
- RFC: First pass at making the node generic...
- [PATCH: node 0/3] replace ovirt-identify-node with matahari
- [PATCH: ovirt-identify-node replacement 0/4] ovirt node patch to replace ovirt-identify-node with matahari qmf agent
- Bugfixes...