From 301c3c44758bdccd65a3ce795e719916a48948dc Mon Sep 17 00:00:00 2001 From: Chris Alfonso Date: Tue, 20 Aug 2013 16:02:57 -0400 Subject: [PATCH] Extracting common functionality for rpm based distros Rather than dublicating code to implement rhel or any other derivitive, this patch introduces an rpm-distro element that should be used as a dependency. Change-Id: I8a92bb041764d03f430b438f0013704f79a8674c --- elements/fedora/element-deps | 1 + .../finalise.d/11-selinux-fixfiles-restore | 0 .../post-install.d/05-fstab-rootfs-label | 0 .../post-install.d/06-network-config-nonzeroconf | 0 .../{fedora => rpm-distro}/pre-install.d/00-allow-root-sudo | 0 elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path | 3 +++ elements/{fedora => rpm-distro}/pre-install.d/01-install-bin | 0 .../{fedora => rpm-distro}/pre-install.d/01-override-yum-arch | 0 8 files changed, 4 insertions(+) rename elements/{fedora => rpm-distro}/finalise.d/11-selinux-fixfiles-restore (100%) rename elements/{fedora => rpm-distro}/post-install.d/05-fstab-rootfs-label (100%) rename elements/{fedora => rpm-distro}/post-install.d/06-network-config-nonzeroconf (100%) rename elements/{fedora => rpm-distro}/pre-install.d/00-allow-root-sudo (100%) create mode 100755 elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path rename elements/{fedora => rpm-distro}/pre-install.d/01-install-bin (100%) rename elements/{fedora => rpm-distro}/pre-install.d/01-override-yum-arch (100%) diff --git a/elements/fedora/element-deps b/elements/fedora/element-deps index d04ce43d..5411fe64 100644 --- a/elements/fedora/element-deps +++ b/elements/fedora/element-deps @@ -3,3 +3,4 @@ dracut-network cache-url dkms yum +rpm-distro diff --git a/elements/fedora/finalise.d/11-selinux-fixfiles-restore b/elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore similarity index 100% rename from elements/fedora/finalise.d/11-selinux-fixfiles-restore rename to elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore diff --git a/elements/fedora/post-install.d/05-fstab-rootfs-label b/elements/rpm-distro/post-install.d/05-fstab-rootfs-label similarity index 100% rename from elements/fedora/post-install.d/05-fstab-rootfs-label rename to elements/rpm-distro/post-install.d/05-fstab-rootfs-label diff --git a/elements/fedora/post-install.d/06-network-config-nonzeroconf b/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf similarity index 100% rename from elements/fedora/post-install.d/06-network-config-nonzeroconf rename to elements/rpm-distro/post-install.d/06-network-config-nonzeroconf diff --git a/elements/fedora/pre-install.d/00-allow-root-sudo b/elements/rpm-distro/pre-install.d/00-allow-root-sudo similarity index 100% rename from elements/fedora/pre-install.d/00-allow-root-sudo rename to elements/rpm-distro/pre-install.d/00-allow-root-sudo diff --git a/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path b/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path new file mode 100755 index 00000000..addfc0c0 --- /dev/null +++ b/elements/rpm-distro/pre-install.d/00-usr-local-bin-secure-path @@ -0,0 +1,3 @@ +#!/bin/bash + +sed -i '/secure_path/ s/$/:\/usr\/local\/bin/' /etc/sudoers diff --git a/elements/fedora/pre-install.d/01-install-bin b/elements/rpm-distro/pre-install.d/01-install-bin similarity index 100% rename from elements/fedora/pre-install.d/01-install-bin rename to elements/rpm-distro/pre-install.d/01-install-bin diff --git a/elements/fedora/pre-install.d/01-override-yum-arch b/elements/rpm-distro/pre-install.d/01-override-yum-arch similarity index 100% rename from elements/fedora/pre-install.d/01-override-yum-arch rename to elements/rpm-distro/pre-install.d/01-override-yum-arch