ramdisk: Migrate everything during the update

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2015-12-03 16:34:59 +00:00
parent 6146d1904a
commit 228bec09bf
2 changed files with 34 additions and 0 deletions

View File

@@ -1,6 +1,14 @@
etc/system-release etc/system-release
etc/issue etc/issue
etc/rc.d/init.d/snort 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 opt/pakfire/lib/functions.pl
usr/sbin/convert-portfw usr/sbin/convert-portfw
var/ipfire/general-functions.pl var/ipfire/general-functions.pl

View File

@@ -33,6 +33,24 @@ done
# Stop services # Stop services
/etc/init.d/fcron stop /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
extract_files extract_files
@@ -40,6 +58,11 @@ extract_files
# Update Language cache # Update Language cache
# /usr/local/bin/update-lang-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 if [ -L "/var/spool/cron" ]; then
rm -f /var/spool/cron rm -f /var/spool/cron
mv /var/log/rrd/cron /var/spool/cron mv /var/log/rrd/cron /var/spool/cron
@@ -47,8 +70,11 @@ if [ -L "/var/spool/cron" ]; then
fi fi
# Start services # Start services
/etc/init.d/collectd start
/etc/init.d/vnstat start
/etc/init.d/fcron start /etc/init.d/fcron start
/etc/init.d/dnsmasq restart /etc/init.d/dnsmasq restart
qosctrl start
# This update need a reboot... # This update need a reboot...
#touch /var/run/need_reboot #touch /var/run/need_reboot