apply Ciro's rpm in f14 slice image
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 28 May 2015 07:01:18 +0000 (09:01 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 28 May 2015 07:01:18 +0000 (09:01 +0200)
config.planetlab/sliceimage.post

index 1db1869..45cbd3b 100644 (file)
@@ -9,17 +9,17 @@ if [ -z "${vdir}" ] ; then
 fi
 
 # reset root password to be empty
-echo "in slice image: resetting root password"
+echo "in slice image: resetting root password"
 sed -i -e "s/root:[\*|x]/root:/" ${vdir}/etc/passwd
 
 # modify the sudoers file to remove the 'requiretty' attribute
-echo "in slice image: removing requiretty from /etc/sudoers"
+echo "in slice image: removing requiretty from /etc/sudoers"
 sed -i -e 's,^\(Defaults.*requiretty\),#\1,' ${vdir}/etc/sudoers
 
 # Fix up /etc/init.d/halt 
 # xxx this would be wrong in f>=16 because there's no /sbin anymore
 # but I suspect this is for vserver only..
-echo "in slice image: fixing /etc/init.d/halt"
+echo "in slice image: fixing /etc/init.d/halt"
 cat > ${vdir}/etc/init.d/halt <<EOF
 #!/bin/bash
 exec /sbin/killall5 -15
@@ -30,9 +30,9 @@ EOF
 cd ${vdir}
 if [ -d selinux ] ; then
     if [ "$(ls -A selinux)" ] ; then
-       echo "sliceimage.post: WARNING: ${vdir}/selinux is not empty - preserving"
+       echo "sliceimage.post: WARNING: ${vdir}/selinux is not empty - preserving"
     else
-       echo "sliceimage.post: REMOVING empty ${vdir}/selinux"
+       echo "sliceimage.post: REMOVING empty ${vdir}/selinux"
        rmdir selinux
     fi
 fi
@@ -45,4 +45,11 @@ sed -i -e 's,1 1,0 0,' ${vdir}/etc/fstab
 # this is not required in f>=16 since these files are upstart-specific anyway
 rm -f ${vdir}/etc/event.d/tty[23456]
 
+# mid 2015 (I know..) : fix for fedora 14 slices
+# use fedora's archive, and other yum-related issues
+if [[ "$vdir" =~ .*f14.* ]] ; then
+    echo "* sliceimage.post: rectifying fedora14 slice image with fedora-release-14-2.noarch.rpm"
+    chroot $vdir rpm -U http://mirror.onelab.eu/third-party/fedora-release-14-2.noarch.rpm
+fi
+
 cd -