diff --git a/Makefile b/Makefile index 09a6684..4416dc1 100644 --- a/Makefile +++ b/Makefile @@ -147,62 +147,62 @@ install-bin: # install-hooks: for i in roles/* ; do if [ -f $$i ]; then cp $$i ${prefix}/etc/xen-tools/role.d; fi ; done - for i in ${prefix}/usr/lib/xen-tools/*.d; do if [ -L "$$i" ]; then rm -vf "$$i"; fi; done - mkdir -p ${prefix}/usr/lib/xen-tools/centos-4.d/ - mkdir -p ${prefix}/usr/lib/xen-tools/centos-5.d/ - mkdir -p ${prefix}/usr/lib/xen-tools/centos-6.d/ - mkdir -p ${prefix}/usr/lib/xen-tools/fedora-core-6.d/ - cp -R hooks/centos-4/*-* ${prefix}/usr/lib/xen-tools/centos-4.d - cp -R hooks/centos-5/*-* ${prefix}/usr/lib/xen-tools/centos-5.d - cp -R hooks/centos-6/*-* ${prefix}/usr/lib/xen-tools/centos-6.d - cp -R hooks/fedora-core-6/*-* ${prefix}/usr/lib/xen-tools/fedora-core-6.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-4.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-5.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-7.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-8.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-9.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-10.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-11.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-12.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-13.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-14.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-15.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-16.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s fedora-core-6.d fedora-core-17.d - mkdir -p ${prefix}/usr/lib/xen-tools/debian.d/ - cp -R hooks/debian/*-* ${prefix}/usr/lib/xen-tools/debian.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d sarge.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d etch.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d lenny.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d squeeze.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d wheezy.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d jessie.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d sid.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d testing.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s debian.d stable.d - mkdir -p ${prefix}/usr/lib/xen-tools/gentoo.d/ - cp -R hooks/gentoo/*-* ${prefix}/usr/lib/xen-tools/gentoo.d - mkdir -p ${prefix}/usr/lib/xen-tools/dapper.d/ - cp -R hooks/dapper/*-* ${prefix}/usr/lib/xen-tools/dapper.d/ - mkdir -p ${prefix}/usr/lib/xen-tools/edgy.d/ - cp -R hooks/edgy/*-* ${prefix}/usr/lib/xen-tools/edgy.d/ - -cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d feisty.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d gutsy.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d hardy.d - mkdir -p ${prefix}/usr/lib/xen-tools/intrepid.d/ - cp -R hooks/intrepid/*-* ${prefix}/usr/lib/xen-tools/intrepid.d/ - -cd ${prefix}/usr/lib/xen-tools/ && ln -s intrepid.d jaunty.d - mkdir -p ${prefix}/usr/lib/xen-tools/karmic.d/ - cp -R hooks/karmic/*-* ${prefix}/usr/lib/xen-tools/karmic.d/ - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d lucid.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d maverick.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d natty.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d oneiric.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d precise.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d quantal.d - -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d raring.d - cp hooks/common.sh ${prefix}/usr/lib/xen-tools - cp -r hooks/common ${prefix}/usr/lib/xen-tools + for i in ${prefix}/usr/share/xen-tools/*.d; do if [ -L "$$i" ]; then rm -vf "$$i"; fi; done + mkdir -p ${prefix}/usr/share/xen-tools/centos-4.d/ + mkdir -p ${prefix}/usr/share/xen-tools/centos-5.d/ + mkdir -p ${prefix}/usr/share/xen-tools/centos-6.d/ + mkdir -p ${prefix}/usr/share/xen-tools/fedora-core-6.d/ + cp -R hooks/centos-4/*-* ${prefix}/usr/share/xen-tools/centos-4.d + cp -R hooks/centos-5/*-* ${prefix}/usr/share/xen-tools/centos-5.d + cp -R hooks/centos-6/*-* ${prefix}/usr/share/xen-tools/centos-6.d + cp -R hooks/fedora-core-6/*-* ${prefix}/usr/share/xen-tools/fedora-core-6.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-4.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-5.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-7.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-8.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-9.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-10.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-11.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-12.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-13.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-14.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-15.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-16.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s fedora-core-6.d fedora-core-17.d + mkdir -p ${prefix}/usr/share/xen-tools/debian.d/ + cp -R hooks/debian/*-* ${prefix}/usr/share/xen-tools/debian.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d sarge.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d etch.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d lenny.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d squeeze.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d wheezy.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d jessie.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d sid.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d testing.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d stable.d + mkdir -p ${prefix}/usr/share/xen-tools/gentoo.d/ + cp -R hooks/gentoo/*-* ${prefix}/usr/share/xen-tools/gentoo.d + mkdir -p ${prefix}/usr/share/xen-tools/dapper.d/ + cp -R hooks/dapper/*-* ${prefix}/usr/share/xen-tools/dapper.d/ + mkdir -p ${prefix}/usr/share/xen-tools/edgy.d/ + cp -R hooks/edgy/*-* ${prefix}/usr/share/xen-tools/edgy.d/ + -cd ${prefix}/usr/share/xen-tools/ && ln -s edgy.d feisty.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s edgy.d gutsy.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s edgy.d hardy.d + mkdir -p ${prefix}/usr/share/xen-tools/intrepid.d/ + cp -R hooks/intrepid/*-* ${prefix}/usr/share/xen-tools/intrepid.d/ + -cd ${prefix}/usr/share/xen-tools/ && ln -s intrepid.d jaunty.d + mkdir -p ${prefix}/usr/share/xen-tools/karmic.d/ + cp -R hooks/karmic/*-* ${prefix}/usr/share/xen-tools/karmic.d/ + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d lucid.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d maverick.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d natty.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d oneiric.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d precise.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d quantal.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d raring.d + cp hooks/common.sh ${prefix}/usr/share/xen-tools + cp -r hooks/common ${prefix}/usr/share/xen-tools # @@ -303,7 +303,9 @@ uninstall: -rm -rf ${prefix}/etc/xen-tools/skel -rmdir ${prefix}/etc/xen-tools/ -rm -f ${prefix}/etc/bash_completion.d/xen-tools + # Maybe needed to remove older releases of xen-tools rm -rf ${prefix}/usr/lib/xen-tools + rm -rf ${prefix}/usr/share/xen-tools rm -f ${prefix}/usr/share/man/man8/xen-create-image.8.gz rm -f ${prefix}/usr/share/man/man8/xen-delete-image.8.gz rm -f ${prefix}/usr/share/man/man8/xen-list-images.8.gz diff --git a/TODO.markdown b/TODO.markdown index e5e6543..d40f669 100644 --- a/TODO.markdown +++ b/TODO.markdown @@ -232,6 +232,3 @@ Axel's Break-Backwards-Compatibility Wishlist Maybe add some `--autostart` or such. * Maybe replace findBinary with File::Which - -* Move /usr/lib/xen-tools/ to /usr/share/xen-tools/ as all file in - there are either shell or perl scripts. diff --git a/bin/xen-create-image b/bin/xen-create-image index b1ac0fa..978f5ed 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1426,9 +1426,9 @@ sub checkOption message => "takes a suffixed integer.\n", }, distribution => { - check => sub { -d "/usr/lib/xen-tools/$_[0].d" }, + check => sub { -d "/usr/share/xen-tools/$_[0].d" }, message => "takes a distribution name " . - "(see /usr/lib/xen-tools for valid values).\n", + "(see /usr/share/xen-tools for valid values).\n", }, imageType => { check => qr/^sparse|full$/, diff --git a/bin/xt-customize-image b/bin/xt-customize-image index adc2abb..7fc44f1 100755 --- a/bin/xt-customize-image +++ b/bin/xt-customize-image @@ -54,7 +54,7 @@ xt-customize-image - Customize a freshly installed copy of GNU/Linux the --location option. For the distribution named 'foo' the scripts will be loaded and - executed from '/usr/lib/xen-tools/foo.d'. Each executable will + executed from '/usr/share/xen-tools/foo.d'. Each executable will be loaded and executed in sorted order. =cut @@ -215,7 +215,7 @@ sub checkArguments # If there are no scripts then we clearly cannot # customise it! # - my $dir = "/usr/lib/xen-tools/" . $CONFIG{ 'dist' } . ".d"; + my $dir = "/usr/share/xen-tools/" . $CONFIG{ 'dist' } . ".d"; if ( !-d $dir ) { @@ -257,7 +257,7 @@ sub runDistributionHooks # # Hook directory. # - my $hooks = "/usr/lib/xen-tools/" . $CONFIG{ 'dist' } . ".d/"; + my $hooks = "/usr/share/xen-tools/" . $CONFIG{ 'dist' } . ".d/"; # # Installation prefix diff --git a/bin/xt-install-image b/bin/xt-install-image index 2cb29b8..d46b0e2 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -387,7 +387,7 @@ sub checkArguments # If there are no scripts then we clearly cannot # customise it! # - my $dir = "/usr/lib/xen-tools/" . $CONFIG{ 'dist' } . ".d"; + my $dir = "/usr/share/xen-tools/" . $CONFIG{ 'dist' } . ".d"; if ( !-d $dir ) { diff --git a/debian/NEWS b/debian/NEWS index b080580..6122320 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -4,7 +4,14 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low environment variable names are from now on converted to underscores ("_") before being exported. May affect some hook or role scripts. - -- Axel Beckert Wed, 13 Mar 2013 23:22:20 +0100 + * /usr/lib/xen-tools/ has been moved to /usr/share/xen-tools/ to + properly adhere to FHS. In case you had local scripts added to + /usr/lib/xen-tools/, please move them to /usr/share/xen-tools/, too + and then remove /usr/lib/xen-tools/ and its left-over subdirectories + which all should be empty at that point, i.e. "rmdir -p + /usr/lib/xen-tools/*" should do the trick. + + -- Axel Beckert Fri, 05 Apr 2013 20:19:02 +0200 xen-tools (4.2~rc1-1) unstable; urgency=low diff --git a/debian/changelog b/debian/changelog index 5aad773..7fcf6dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low * New upstream release - Code deduplication to unify the xen-*-image scripts + - Moves /usr/lib/xen-tools/ to /usr/share/xen-tools/ - Use http.debian.net as default Debian mirror if no mirror is given and xt-guess-suite-and-mirror is not used. - Fix symbolic link hooks/centos-6/15-setup-arch (Closes: #690299) diff --git a/debian/dirs b/debian/dirs index c935e65..d9b8b71 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,4 +1,4 @@ /etc/xen-tools /etc/xen-tools/role.d /etc/xen-tools/skel -/usr/lib/xen-tools \ No newline at end of file +/usr/share/xen-tools \ No newline at end of file diff --git a/hooks/README b/hooks/README index 0ac1a05..4f258d6 100644 --- a/hooks/README +++ b/hooks/README @@ -19,7 +19,7 @@ hooks/ * The installation will have a running installation of OpenSSH The subdirectories in this hooks/ directory will be installed - to the directory /usr/lib/xen-tools/ + to the directory /usr/share/xen-tools/ Steve -- diff --git a/hooks/centos-5/25-setup-kernel b/hooks/centos-5/25-setup-kernel index 52768bd..c65979e 100755 --- a/hooks/centos-5/25-setup-kernel +++ b/hooks/centos-5/25-setup-kernel @@ -8,8 +8,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/centos-6/25-setup-kernel b/hooks/centos-6/25-setup-kernel index 39ee3bf..2c99703 100755 --- a/hooks/centos-6/25-setup-kernel +++ b/hooks/centos-6/25-setup-kernel @@ -8,8 +8,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/01-disable-daemons b/hooks/common/01-disable-daemons index d12d7bd..6e1a888 100755 --- a/hooks/common/01-disable-daemons +++ b/hooks/common/01-disable-daemons @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/05-shadowconfig-on b/hooks/common/05-shadowconfig-on index e5bcbb4..72da2b5 100755 --- a/hooks/common/05-shadowconfig-on +++ b/hooks/common/05-shadowconfig-on @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/10-disable-tls b/hooks/common/10-disable-tls index aa3dc7f..a501f96 100755 --- a/hooks/common/10-disable-tls +++ b/hooks/common/10-disable-tls @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/15-disable-hwclock b/hooks/common/15-disable-hwclock index 74556ac..3495e75 100755 --- a/hooks/common/15-disable-hwclock +++ b/hooks/common/15-disable-hwclock @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/15-setup-arch b/hooks/common/15-setup-arch index 569d572..3fa1ec3 100755 --- a/hooks/common/15-setup-arch +++ b/hooks/common/15-setup-arch @@ -6,8 +6,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/20-setup-apt b/hooks/common/20-setup-apt index 2caa2ee..9b6a6ce 100755 --- a/hooks/common/20-setup-apt +++ b/hooks/common/20-setup-apt @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/20-setup-yum b/hooks/common/20-setup-yum index f5410e0..65968cb 100755 --- a/hooks/common/20-setup-yum +++ b/hooks/common/20-setup-yum @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/25-generate-locale b/hooks/common/25-generate-locale index ca2b099..f03e12f 100755 --- a/hooks/common/25-generate-locale +++ b/hooks/common/25-generate-locale @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/30-disable-gettys b/hooks/common/30-disable-gettys index 821c702..6edc80b 100755 --- a/hooks/common/30-disable-gettys +++ b/hooks/common/30-disable-gettys @@ -12,8 +12,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/40-setup-networking-deb b/hooks/common/40-setup-networking-deb index b5f456f..d8785ae 100755 --- a/hooks/common/40-setup-networking-deb +++ b/hooks/common/40-setup-networking-deb @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/40-setup-networking-rpm b/hooks/common/40-setup-networking-rpm index 992cd3d..4b1b577 100755 --- a/hooks/common/40-setup-networking-rpm +++ b/hooks/common/40-setup-networking-rpm @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/50-setup-hostname-deb b/hooks/common/50-setup-hostname-deb index 2ad57c4..65e30d1 100755 --- a/hooks/common/50-setup-hostname-deb +++ b/hooks/common/50-setup-hostname-deb @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/50-setup-hostname-rpm b/hooks/common/50-setup-hostname-rpm index e2ed19f..5b1db9d 100755 --- a/hooks/common/50-setup-hostname-rpm +++ b/hooks/common/50-setup-hostname-rpm @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/55-create-dev b/hooks/common/55-create-dev index 9b3006c..88b8af2 100755 --- a/hooks/common/55-create-dev +++ b/hooks/common/55-create-dev @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/60-copy-host-files b/hooks/common/60-copy-host-files index 8da3b93..4a772bb 100755 --- a/hooks/common/60-copy-host-files +++ b/hooks/common/60-copy-host-files @@ -11,8 +11,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/65-copy-user-files b/hooks/common/65-copy-user-files index a34fe94..36f6b1f 100755 --- a/hooks/common/65-copy-user-files +++ b/hooks/common/65-copy-user-files @@ -11,8 +11,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/70-install-ssh-deb b/hooks/common/70-install-ssh-deb index 378672c..20775ea 100755 --- a/hooks/common/70-install-ssh-deb +++ b/hooks/common/70-install-ssh-deb @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/70-install-ssh-rpm b/hooks/common/70-install-ssh-rpm index 11dccfa..9ac07db 100755 --- a/hooks/common/70-install-ssh-rpm +++ b/hooks/common/70-install-ssh-rpm @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/75-fixup-securetty b/hooks/common/75-fixup-securetty index 58ab907..9944c2c 100755 --- a/hooks/common/75-fixup-securetty +++ b/hooks/common/75-fixup-securetty @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/80-install-modules-deb b/hooks/common/80-install-modules-deb index 0e5d4c0..2fd731c 100755 --- a/hooks/common/80-install-modules-deb +++ b/hooks/common/80-install-modules-deb @@ -19,8 +19,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/80-install-modules-rpm b/hooks/common/80-install-modules-rpm index d6ea718..d9278ad 100755 --- a/hooks/common/80-install-modules-rpm +++ b/hooks/common/80-install-modules-rpm @@ -19,8 +19,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/81-install-modules-init-tools b/hooks/common/81-install-modules-init-tools index d5216f2..51b9ff6 100755 --- a/hooks/common/81-install-modules-init-tools +++ b/hooks/common/81-install-modules-init-tools @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/82-install-grub-legacy b/hooks/common/82-install-grub-legacy index 41c580c..5f66da2 100755 --- a/hooks/common/82-install-grub-legacy +++ b/hooks/common/82-install-grub-legacy @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/90-make-fstab b/hooks/common/90-make-fstab index 81e715f..1f6757e 100755 --- a/hooks/common/90-make-fstab +++ b/hooks/common/90-make-fstab @@ -17,8 +17,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/99-clean-image-deb b/hooks/common/99-clean-image-deb index d36d438..9340a55 100755 --- a/hooks/common/99-clean-image-deb +++ b/hooks/common/99-clean-image-deb @@ -13,8 +13,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/99-clean-image-rpm b/hooks/common/99-clean-image-rpm index 5540108..2ca250c 100755 --- a/hooks/common/99-clean-image-rpm +++ b/hooks/common/99-clean-image-rpm @@ -12,8 +12,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/common/99-enable-daemons b/hooks/common/99-enable-daemons index c1eb25a..b13b4f7 100755 --- a/hooks/common/99-enable-daemons +++ b/hooks/common/99-enable-daemons @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/debian/20-setup-apt b/hooks/debian/20-setup-apt index dd6bbed..464d4f1 100755 --- a/hooks/debian/20-setup-apt +++ b/hooks/debian/20-setup-apt @@ -14,8 +14,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/debian/80-install-kernel b/hooks/debian/80-install-kernel index 6a950fe..03a1190 100755 --- a/hooks/debian/80-install-kernel +++ b/hooks/debian/80-install-kernel @@ -15,8 +15,8 @@ prefix=$1 # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/debian/95-configure-locales b/hooks/debian/95-configure-locales index 86d7590..ba142ef 100755 --- a/hooks/debian/95-configure-locales +++ b/hooks/debian/95-configure-locales @@ -12,8 +12,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/edgy/80-install-kernel b/hooks/edgy/80-install-kernel index 8dbee40..1c01911 100755 --- a/hooks/edgy/80-install-kernel +++ b/hooks/edgy/80-install-kernel @@ -15,8 +15,8 @@ prefix=$1 # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/gentoo/20-enable-su b/hooks/gentoo/20-enable-su index 8b96c9e..62abe68 100755 --- a/hooks/gentoo/20-enable-su +++ b/hooks/gentoo/20-enable-su @@ -12,8 +12,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/gentoo/40-setup-networking b/hooks/gentoo/40-setup-networking index b2b452d..bbb99ca 100755 --- a/hooks/gentoo/40-setup-networking +++ b/hooks/gentoo/40-setup-networking @@ -12,8 +12,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/gentoo/50-setup-hostname b/hooks/gentoo/50-setup-hostname index f721256..16f0958 100755 --- a/hooks/gentoo/50-setup-hostname +++ b/hooks/gentoo/50-setup-hostname @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/gentoo/70-install-ssh b/hooks/gentoo/70-install-ssh index cf5c213..c8bbb49 100755 --- a/hooks/gentoo/70-install-ssh +++ b/hooks/gentoo/70-install-ssh @@ -16,8 +16,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/intrepid/80-install-kernel b/hooks/intrepid/80-install-kernel index eda34fc..c56b748 100755 --- a/hooks/intrepid/80-install-kernel +++ b/hooks/intrepid/80-install-kernel @@ -15,8 +15,8 @@ prefix=$1 # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/hooks/karmic/80-install-kernel b/hooks/karmic/80-install-kernel index d1147c6..f3f2f0e 100755 --- a/hooks/karmic/80-install-kernel +++ b/hooks/karmic/80-install-kernel @@ -15,8 +15,8 @@ prefix=$1 # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/misc/xen-tools.bash-completion b/misc/xen-tools.bash-completion index 1a9c069..0a15e87 100644 --- a/misc/xen-tools.bash-completion +++ b/misc/xen-tools.bash-completion @@ -65,8 +65,8 @@ _xen_create_image() # Available distributions, by which we mean distributions which # we have hook scripts available. # - for i in `/bin/ls -1 /usr/lib/xen-tools/ ` ; do - if [ -d /usr/lib/xen-tools/${i} ]; then + for i in `/bin/ls -1 /usr/share/xen-tools/ ` ; do + if [ -d /usr/share/xen-tools/${i} ]; then dists="${dists} ${i/.d/}" fi done diff --git a/misc/xen-tools.spec b/misc/xen-tools.spec index 3fbeb6d..a6c055d 100644 --- a/misc/xen-tools.spec +++ b/misc/xen-tools.spec @@ -40,7 +40,7 @@ rm -rf $RPM_BUILD_ROOT /etc/bash_completion.d/* /usr/bin/* /usr/share/man/man8/* -/usr/lib/xen-tools +/usr/share/xen-tools %changelog diff --git a/roles/builder b/roles/builder index efbe277..8884601 100755 --- a/roles/builder +++ b/roles/builder @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/cfengine b/roles/cfengine index e071f53..47b2f25 100755 --- a/roles/cfengine +++ b/roles/cfengine @@ -11,8 +11,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/editor b/roles/editor index 68cefdc..76e1394 100755 --- a/roles/editor +++ b/roles/editor @@ -30,8 +30,8 @@ source=/etc/xen-tools/sed.d/ # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/gdm b/roles/gdm index a9e9aac..9255092 100755 --- a/roles/gdm +++ b/roles/gdm @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/minimal b/roles/minimal index 4f1d159..a52c061 100755 --- a/roles/minimal +++ b/roles/minimal @@ -16,8 +16,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/puppet b/roles/puppet index d0d0eca..be9b79a 100755 --- a/roles/puppet +++ b/roles/puppet @@ -11,8 +11,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/resolv b/roles/resolv index fe5e41a..e8403f6 100755 --- a/roles/resolv +++ b/roles/resolv @@ -8,8 +8,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/sudoers b/roles/sudoers index b6b3df1..08a409b 100755 --- a/roles/sudoers +++ b/roles/sudoers @@ -8,8 +8,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/tmpfs b/roles/tmpfs index fc51625..74f9fc6 100755 --- a/roles/tmpfs +++ b/roles/tmpfs @@ -12,8 +12,8 @@ prefix=$1 # # Source our common functions # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else . ./hooks/common.sh fi diff --git a/roles/udev b/roles/udev index abb39ad..6e2be83 100755 --- a/roles/udev +++ b/roles/udev @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi diff --git a/roles/xdm b/roles/xdm index f51bf72..a57eec8 100755 --- a/roles/xdm +++ b/roles/xdm @@ -15,8 +15,8 @@ prefix=$1 # # Source our common functions - this will let us install a Debian package. # -if [ -e /usr/lib/xen-tools/common.sh ]; then - . /usr/lib/xen-tools/common.sh +if [ -e /usr/share/xen-tools/common.sh ]; then + . /usr/share/xen-tools/common.sh else echo "Installation problem" fi