git://git.onelab.eu
/
vserver-reference.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2da375c
)
- escape % correctly
author
Mark Huang
<mlhuang@cs.princeton.edu>
Sun, 10 Oct 2004 23:17:51 +0000
(23:17 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Sun, 10 Oct 2004 23:17:51 +0000
(23:17 +0000)
vserver-reference.spec
patch
|
blob
|
history
diff --git
a/vserver-reference.spec
b/vserver-reference.spec
index
f3272bf
..
40328d5
100644
(file)
--- a/
vserver-reference.spec
+++ b/
vserver-reference.spec
@@
-102,11
+102,11
@@
EOF
# Prevent all locales from being installed in reference image
mkdir -p %{installroot}/etc/rpm
# Prevent all locales from being installed in reference image
mkdir -p %{installroot}/etc/rpm
-(
-echo "%_install_langs en_US:en"
-echo "%_excludedocs 1"
-echo "%__file_context_path /dev/null"
-) > %{installroot}/etc/rpm/macros
+cat > %{installroot}/etc/rpm/macros <<EOF
+%%_install_langs en_US:en
+%%_excludedocs 1
+%%__file_context_path /dev/null
+EOF
# Initialize RPM database in reference image
mkdir -p %{installroot}/var/lib/rpm
# Initialize RPM database in reference image
mkdir -p %{installroot}/var/lib/rpm
@@
-170,6
+170,12
@@
if [ -n "$SUDO_UID" ] ; then
done
fi
done
fi
+%pre
+# 1 = install, 2 = upgrade/reinstall
+if [ $1 -eq 2 ] ; then
+ chattr -R -i %{vrefdir}
+fi
+
%post
# Copy configuration files from host to reference image
for file in /etc/hosts /etc/resolv.conf /etc/yum.conf ; do
%post
# Copy configuration files from host to reference image
for file in /etc/hosts /etc/resolv.conf /etc/yum.conf ; do