summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-09-30 09:36:35 -0700
committerBrian Behlendorf <[email protected]>2011-09-30 09:36:35 -0700
commit39a87c69211aceef23889ceb4a33291e476237b9 (patch)
treeae5b8b7cecc275ad8dbc4203a6c7de4123cb0ef5
parent97fd6a07c2c2fd1d27fc79938eb1a451c92fbfc4 (diff)
Revert "Stabilize the hostid for RPM installations."
Creating an /etc/hostid file as part of the rpm post install causes problems for diskless systems which are sharing an image. While it's still critical to ensure the hostid doesn't change for zfs root filesystems. This will now be done by setting the /etc/hostid in the initramfs created by dracut. This reverts commit 79593b0dec57ee94c5bb56cdc2770ebde81ecea9.
-rw-r--r--spl-modules.spec.in11
1 files changed, 0 insertions, 11 deletions
diff --git a/spl-modules.spec.in b/spl-modules.spec.in
index ddeb2609d..e02d6c255 100644
--- a/spl-modules.spec.in
+++ b/spl-modules.spec.in
@@ -233,17 +233,6 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/src/*
%post
-# The /sbin/genhostid utility writes a random value to the /etc/hostid
-# file, which means that using it here will break upgrades on systems
-# that already have spl installed.
-if [ ! -f /etc/hostid ]; then
- HOSTID=$(hostid)
- AA=$(echo $HOSTID | cut -b 1,2)
- BB=$(echo $HOSTID | cut -b 3,4)
- CC=$(echo $HOSTID | cut -b 5,6)
- DD=$(echo $HOSTID | cut -b 7,8)
- "$(which printf)" "\x$DD\x$CC\x$BB\x$AA" >"/etc/hostid"
-fi
if [ -f /boot/System.map-%{kver} ]; then
depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0
else