pentest-distro-builder/modules/live-build-config/kali-config/common/hooks/live/kali-hacks.chroot

26 lines
869 B
Text
Raw Normal View History

2018-09-05 17:06:30 -06:00
#!/bin/sh
# Handle systems where /lib is not merged in /usr/lib
if [ ! -h /lib ]; then
mv /usr/lib/live/config/* /lib/live/config/
fi
# Manually enabling pulseaudio for root since autospawning does
# not work for root
# See https://bugs.kali.org/view.php?id=2392
systemctl --user enable pulseaudio.service || true
# Disable the udev rules renaming the network interfaces (can also be
# achieved with kernel command line net.ifnames=0 but we don't have a nice
# way to set it on the installed system)
mkdir -p /etc/systemd/network /etc/udev/rules.d
ln -sf /dev/null /etc/systemd/network/90-mac-for-usb.link
ln -sf /dev/null /etc/systemd/network/99-default.link
echo > /etc/udev/rules.d/73-special-net-names.rules
update-initramfs -u
# Run updatedb to initialize the database for the locate command
if [ -x "$(which updatedb 2>/dev/null)" ]; then
updatedb
fi