mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-26 09:32:11 +00:00
divert /usr/bin/man in minimized images to a script that mentions the unminimize script
This commit is contained in:
parent
7e1bd33544
commit
514faae2db
@ -152,6 +152,10 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp
|
|||||||
echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually."
|
echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove diverted man binary
|
||||||
|
rm -f /usr/bin/man
|
||||||
|
dpkg-divert --quiet --remove --rename /usr/bin/man
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$PROJECT" != "ubuntu-base" ]; then
|
if [ "$PROJECT" != "ubuntu-base" ]; then
|
||||||
@ -190,7 +194,19 @@ echo "To restore this content, you can run the 'unminimize' command."
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x chroot/etc/update-motd.d/60-unminimize
|
chmod +x chroot/etc/update-motd.d/60-unminimize
|
||||||
fi
|
Chroot chroot "dpkg-divert --quiet --add \
|
||||||
|
--divert /usr/bin/man.REAL --rename \
|
||||||
|
/usr/bin/man"
|
||||||
|
cat > chroot/usr/bin/man << EOF
|
||||||
|
#!/bin/sh
|
||||||
|
echo "This system has been minimized by removing packages and content that are"
|
||||||
|
echo "not required on a system that users do not log into."
|
||||||
|
echo ""
|
||||||
|
echo "To restore this content, including manpages, you can run the 'unminimize'"
|
||||||
|
echo " command."
|
||||||
|
EOF
|
||||||
|
chmod +x chroot/usr/bin/man
|
||||||
|
fi
|
||||||
Chroot chroot "dpkg-divert --quiet --add \
|
Chroot chroot "dpkg-divert --quiet --add \
|
||||||
--divert /usr/sbin/update-initramfs.REAL --rename \
|
--divert /usr/sbin/update-initramfs.REAL --rename \
|
||||||
/usr/sbin/update-initramfs"
|
/usr/sbin/update-initramfs"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user