Commit 53bd92ea by Michael H. Warfield Committed by Stéphane Graber

Fix version checking typos in Fedora template.

Backported typo fixes from CentOS template back to Fedora Template Bumped default rev from Fedora 18 to Fedora 19 Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent c6df5ca4
...@@ -51,7 +51,7 @@ fi ...@@ -51,7 +51,7 @@ fi
if [ "${CPE_NAME}" = "" -a -e /etc/system-release-cpe ] if [ "${CPE_NAME}" = "" -a -e /etc/system-release-cpe ]
then then
CPE_NAME=$(head -n1 /etc/system-release-cpe) CPE_NAME=$(head -n1 /etc/system-release-cpe)
CPE_URI=$(expr ${CPE_NAME} : '\([^:]*:[^:*]\)') CPE_URI=$(expr ${CPE_NAME} : '\([^:]*:[^:]*\)')
if [ "${CPE_URI}" != "cpe:/o" ] if [ "${CPE_URI}" != "cpe:/o" ]
then then
CPE_NAME= CPE_NAME=
...@@ -117,6 +117,32 @@ configure_fedora() ...@@ -117,6 +117,32 @@ configure_fedora()
sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/login sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/login
sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/sshd sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/sshd
if [ -f ${rootfs_path}/etc/pam.d/crond ]
then
sed -i '/^session.*pam_loginuid.so/s/^session/# session/' ${rootfs_path}/etc/pam.d/crond
fi
# In addition to disabling pam_loginuid in the above config files
# we'll also disable it by linking it to pam_permit to catch any
# we missed or any that get installed after the container is built.
#
# Catch either or both 32 and 64 bit archs.
if [ -f ${rootfs_path}/lib/security/pam_loginuid.so ]
then
( cd ${rootfs_path}/lib/security/
mv pam_loginuid.so pam_loginuid.so.disabled
ln -s pam_permit.so pam_loginuid.so
)
fi
if [ -f ${rootfs_path}/lib64/security/pam_loginuid.so ]
then
( cd ${rootfs_path}/lib64/security/
mv pam_loginuid.so pam_loginuid.so.disabled
ln -s pam_permit.so pam_loginuid.so
)
fi
# configure the network using the dhcp # configure the network using the dhcp
cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0 cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 DEVICE=eth0
...@@ -1024,8 +1050,8 @@ if [ -z "$release" ]; then ...@@ -1024,8 +1050,8 @@ if [ -z "$release" ]; then
if [ "$is_fedora" -a "$fedora_host_ver" ]; then if [ "$is_fedora" -a "$fedora_host_ver" ]; then
release=$fedora_host_ver release=$fedora_host_ver
else else
echo "This is not a fedora host and release missing, defaulting to 18. use -R|--release to specify release" echo "This is not a fedora host and release missing, defaulting to 19. use -R|--release to specify release"
release=18 release=19
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment