mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
Core Update 167: Replace /etc/mtab by symlink to /proc/self/mounts
mount, as updated via util-linux, no longer writes /etc/mtab, causing programs to rely on this file's content (such as the check_disk Nagios plugin) to stop working. /proc/self/mounts contains all the necessary information, so it is fine to replace /etc/mtab by a symlink to it. Fixes: #12843 Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
etc/collectd.conf
|
etc/collectd.conf
|
||||||
etc/inittab.d
|
etc/inittab.d
|
||||||
etc/rc.d/init.d/firewall
|
etc/rc.d/init.d/firewall
|
||||||
|
etc/rc.d/init.d/mountfs
|
||||||
etc/rc.d/init.d/pakfire
|
etc/rc.d/init.d/pakfire
|
||||||
|
etc/rc.d/init.d/partresize
|
||||||
etc/sysctl.conf
|
etc/sysctl.conf
|
||||||
lib/udev/network-hotplug-bridges
|
lib/udev/network-hotplug-bridges
|
||||||
srv/web/ipfire/cgi-bin/connections.cgi
|
srv/web/ipfire/cgi-bin/connections.cgi
|
||||||
|
|||||||
@@ -386,6 +386,10 @@ hardlink -c -vv /lib/firmware
|
|||||||
# Regenerate all initrds
|
# Regenerate all initrds
|
||||||
dracut --regenerate-all --force
|
dracut --regenerate-all --force
|
||||||
|
|
||||||
|
# Replace /etc/mtab by symlink as mount no longer writes it
|
||||||
|
rm -vf /etc/mtab
|
||||||
|
ln -vs /proc/self/mounts /etc/mtab
|
||||||
|
|
||||||
# Export the location database again and reload the firewall engine
|
# Export the location database again and reload the firewall engine
|
||||||
/usr/local/bin/update-location-database
|
/usr/local/bin/update-location-database
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ endif
|
|||||||
cp -rvf $(DIR_SRC)/config/etc/* /etc;
|
cp -rvf $(DIR_SRC)/config/etc/* /etc;
|
||||||
[ ! -d "$(DIR_SRC)/config/etc-$(BUILD_ARCH)" ] || cp -rvf $(DIR_SRC)/config/etc-$(BUILD_ARCH)/* /etc
|
[ ! -d "$(DIR_SRC)/config/etc-$(BUILD_ARCH)" ] || cp -rvf $(DIR_SRC)/config/etc-$(BUILD_ARCH)/* /etc
|
||||||
cp -rvf $(DIR_SRC)/config/lib/* /lib;
|
cp -rvf $(DIR_SRC)/config/lib/* /lib;
|
||||||
touch /etc/{fs,m}tab
|
touch /etc/fstab
|
||||||
|
ln -s /proc/self/mounts /etc/mtab
|
||||||
echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
|
echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
|
||||||
echo "===============================" >> /etc/issue
|
echo "===============================" >> /etc/issue
|
||||||
echo "\n running on \s \r \m" >> /etc/issue
|
echo "\n running on \s \r \m" >> /etc/issue
|
||||||
|
|||||||
@@ -31,12 +31,6 @@ case "${1}" in
|
|||||||
# Remove fsck-related file system watermarks.
|
# Remove fsck-related file system watermarks.
|
||||||
rm -f /fastboot /forcefsck
|
rm -f /fastboot /forcefsck
|
||||||
|
|
||||||
boot_mesg "Create /etc/mtab..."
|
|
||||||
> /etc/mtab
|
|
||||||
mount -f / || failed=1
|
|
||||||
(exit ${failed})
|
|
||||||
evaluate_retval
|
|
||||||
|
|
||||||
# This will mount all filesystems that do not have _netdev in
|
# This will mount all filesystems that do not have _netdev in
|
||||||
# their option list. _netdev denotes a network filesystem.
|
# their option list. _netdev denotes a network filesystem.
|
||||||
boot_mesg "Mounting remaining file systems..."
|
boot_mesg "Mounting remaining file systems..."
|
||||||
|
|||||||
@@ -30,12 +30,6 @@ case "${1}" in
|
|||||||
mount -o remount,rw / > /dev/null
|
mount -o remount,rw / > /dev/null
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
|
|
||||||
boot_mesg "Create /etc/mtab..."
|
|
||||||
> /etc/mtab
|
|
||||||
mount -f / || failed=1
|
|
||||||
(exit ${failed})
|
|
||||||
evaluate_retval
|
|
||||||
|
|
||||||
# check if serial console enabled
|
# check if serial console enabled
|
||||||
scon="off";
|
scon="off";
|
||||||
if [ ! "$(grep "console=ttyS0" /proc/cmdline)" == "" ]; then
|
if [ ! "$(grep "console=ttyS0" /proc/cmdline)" == "" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user