Moving removal of openssh-server host keys from chroot_hacks to a hook, that way it can be easily skipped if desired.

This commit is contained in:
Daniel Baumann 2011-08-23 17:10:38 +02:00
parent 535e9a5d94
commit 9a59c0a2d6
3 changed files with 12 additions and 4 deletions

View File

@ -587,6 +587,7 @@ Set_defaults ()
LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-update-apt-file-cache \ LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-update-apt-file-cache \
update-apt-xapian-index \ update-apt-xapian-index \
update-mlocate-database \ update-mlocate-database \
remove-openssh-server-host-keys \
remove-python-py}" remove-python-py}"
;; ;;
@ -595,6 +596,7 @@ Set_defaults ()
update-apt-xapian-index \ update-apt-xapian-index \
update-mlocate-database \ update-mlocate-database \
remove-gnome-icon-cache \ remove-gnome-icon-cache \
remove-openssh-server-host-keys \
remove-python-py}" remove-python-py}"
;; ;;
esac esac

View File

@ -140,10 +140,6 @@ do
esac esac
done done
# Removing openssh-server hostkeys,
# they are regenerated by live-config.
rm -f chroot/etc/ssh/ssh_host_*_key chroot/etc/ssh/ssh_host_*_key.pub
# Removing udev mac caching rule # Removing udev mac caching rule
rm -f chroot/etc/udev/rules.d/*persistent-net.rules rm -f chroot/etc/udev/rules.d/*persistent-net.rules

View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
# Remove OpenSSH Host Keys.
#
# This removes openssh-server host keys, they are regenerated by live-config
# on system start.
rm -f /etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key.pub