mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 01:38:25 +02:00
ramdisk: Migrate everything during the update
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
etc/system-release
|
||||
etc/issue
|
||||
etc/rc.d/init.d/snort
|
||||
etc/vnstat.conf
|
||||
etc/rc.d/init.d/cleanfs
|
||||
etc/rc.d/init.d/collectd
|
||||
etc/rc.d/init.d/functions
|
||||
etc/rc.d/init.d/vnstat
|
||||
etc/rc.d/rc0.d/K51vnstat
|
||||
etc/rc.d/rc3.d/S01vnstat
|
||||
etc/rc.d/rc6.d/K51vnstat
|
||||
opt/pakfire/lib/functions.pl
|
||||
usr/sbin/convert-portfw
|
||||
var/ipfire/general-functions.pl
|
||||
|
||||
@@ -33,6 +33,24 @@ done
|
||||
|
||||
# Stop services
|
||||
/etc/init.d/fcron stop
|
||||
/etc/init.d/collectd stop
|
||||
qosctrl stop
|
||||
|
||||
# Backup RRDs
|
||||
if [ -d "/var/log/rrd.bak" ]; then
|
||||
# Umount ramdisk
|
||||
umount -l "/var/log/rrd"
|
||||
rm -f "/var/log/rrd"
|
||||
|
||||
mv "/var/log/rrd.bak/vnstat" "/var/log/vnstat"
|
||||
mv "/var/log/rrd.bak" "/var/log/rrd"
|
||||
fi
|
||||
|
||||
# Remove old scripts
|
||||
rm -f /etc/rc.d/init.d/tmpfs \
|
||||
/etc/rc.d/rc0.d/K85tmpfs \
|
||||
/etc/rc.d/rc3.d/S01tmpfs \
|
||||
/etc/rc.d/rc6.d/K85tmpfs
|
||||
|
||||
# Extract files
|
||||
extract_files
|
||||
@@ -40,6 +58,11 @@ extract_files
|
||||
# Update Language cache
|
||||
# /usr/local/bin/update-lang-cache
|
||||
|
||||
# Keep (almost) old ramdisk behaviour
|
||||
if [ ! -e "/etc/sysconfig/ramdisk" ]; then
|
||||
echo "RAMDISK_MODE=2" > /etc/sysconfig/ramdisk
|
||||
fi
|
||||
|
||||
if [ -L "/var/spool/cron" ]; then
|
||||
rm -f /var/spool/cron
|
||||
mv /var/log/rrd/cron /var/spool/cron
|
||||
@@ -47,8 +70,11 @@ if [ -L "/var/spool/cron" ]; then
|
||||
fi
|
||||
|
||||
# Start services
|
||||
/etc/init.d/collectd start
|
||||
/etc/init.d/vnstat start
|
||||
/etc/init.d/fcron start
|
||||
/etc/init.d/dnsmasq restart
|
||||
qosctrl start
|
||||
|
||||
# This update need a reboot...
|
||||
#touch /var/run/need_reboot
|
||||
|
||||
Reference in New Issue
Block a user