pushd bootcd
# Build the reference image
-./prep.sh
+./prep.sh -r $([ -f "/etc/fedora-release" ] && awk ' { print $4 } ' /etc/fedora-release || echo 4)
# Build the default configuration (PlanetLab)
./build.sh
build/isofs/kernel \
build/passwd \
build/version.txt \
+ bootcustom.sh \
configurations \
syslinux/unix/syslinux | \
tar -C $RPM_BUILD_ROOT/%{_datadir}/%{name}/ -xpf -
# If run under sudo
if [ -n "$SUDO_USER" ] ; then
# Allow user to delete the build directory
- chown -R $SUDO_USER .
+ chown -h -R $SUDO_USER .
# Some temporary cdroot files like /var/empty/sshd and
# /usr/bin/sudo get created with non-readable permissions.
find . -not -perm +0600 -exec chmod u+rw {} \;
# Allow user to delete the built RPM(s)
- chown -R $SUDO_USER %{_rpmdir}/%{_arch}
+ chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
fi
%post planetlab