]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/rootfiles/core/158/update.sh
Merge remote-tracking branch 'origin/next'
[people/pmueller/ipfire-2.x.git] / config / rootfiles / core / 158 / update.sh
similarity index 50%
rename from config/rootfiles/core/157/update.sh
rename to config/rootfiles/core/158/update.sh
index 94b10723ff65cb260d35e2835163618ccadfd597..b8ff724f54ae5027082da0d5c5a4f2327f6ffe94 100644 (file)
 . /opt/pakfire/lib/functions.sh
 /usr/local/bin/backupctrl exclude >/dev/null 2>&1
 
-core=157
-
-exit_with_error() {
-       # Set last succesfull installed core.
-       echo $(($core-1)) > /opt/pakfire/db/core/mine
-       # force fsck at next boot, this may fix free space on xfs
-       touch /forcefsck
-       # don't start pakfire again at error
-       killall -KILL pak_update
-       /usr/bin/logger -p syslog.emerg -t ipfire \
-               "core-update-${core}: $1"
-       exit $2
-}
+core=158
 
 # Remove old core updates from pakfire cache to save space...
 for (( i=1; i<=$core; i++ )); do
        rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
 done
 
-KVER="xxxKVERxxx"
-
-# Backup uEnv.txt if exist
-if [ -e /boot/uEnv.txt ]; then
-       cp -vf /boot/uEnv.txt /boot/uEnv.txt.org
-fi
-
-# Do some sanity checks.
-case $(uname -r) in
-       *-ipfire-kirkwood)
-               exit_with_error "ERROR cannot update. kirkwood kernel was not supported." 1
-               ;;
-       *-ipfire*)
-               # Ok.
-               ;;
-       *)
-               exit_with_error "ERROR cannot update. No IPFire Kernel." 1
-               ;;
-esac
-if [ -e /boot/grub/grub.conf ]; then
-       exit_with_error "ERROR unsupported GRUB1/pygrub found!" 1
-fi
-
-# Check diskspace on root
-ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
-
-if [ $ROOTSPACE -lt 100000 ]; then
-       exit_with_error "ERROR cannot update because not enough free space on root." 2
-       exit 2
-fi
-
-# Remove the old kernel
-rm -rf /boot/System.map-*
-rm -rf /boot/config-*
-rm -rf /boot/ipfirerd-*
-rm -rf /boot/initramfs-*
-rm -rf /boot/vmlinuz-*
-rm -rf /boot/uImage-*-ipfire-*
-rm -rf /boot/zImage-*-ipfire-*
-rm -rf /boot/uInit-*-ipfire-*
-rm -rf /boot/dtb-*-ipfire-*
-rm -rf /lib/modules
-
 # Remove files
-rm -rf /usr/lib/libboost*.so.1.71.0
+rm -vrf \
+       /etc/rc.d/init.d/upnpd \
+       /etc/rc.d/init.d/networking/red.down/10-miniupnpd \
+       /etc/rc.d/init.d/networking/red.up/10-miniupnpd \
+       /usr/lib/conntrack-tools \
+       /usr/lib/libixml.so.* \
+       /usr/lib/libupnp.so.* \
+       /var/ipfire/upnp \
+       /lib/firmware/cxgb4/t4fw-1.24.14.0.bin \
+       /lib/firmware/cxgb4/t5fw-1.24.14.0.bin \
+       /lib/firmware/cxgb4/t6fw-1.24.14.0.bin \
+       /lib/firmware/intel/ice/ddp/ice-1.3.4.0.pkg
 
 # Stop services
 
@@ -97,59 +53,19 @@ extract_files
 # update linker config
 ldconfig
 
-# Apply local configuration to sshd_config
-/usr/local/bin/sshctrl
-
 # Update Language cache
 /usr/local/bin/update-lang-cache
 
 # Filesytem cleanup
 /usr/local/bin/filesystem-cleanup
 
-# Fix file permissions changed
-chmod -s /usr/bin/gpg
-chmod -x \
-       /var/ipfire/fwhosts/icmp-types \
-       /var/ipfire/ovpn/ovpn-leases.db
-
-chown -R root:root \
-       /var/ipfire/updatexlrator/bin \
-       /var/ipfire/urlfilter/bin
-
-chown root:root \
-       /srv/web/ipfire/cgi-bin/cachemgr.cgi
-
-# Delete scrubbed files
-rm -f \
-       /usr/lib/dma-mbox-create \
-       /usr/lib/openssh/ssh-keysign
-
-# Delete orphaned pppd 2.4.8 shared object files
-rm -rf \
-       /usr/lib/pppd/2.4.8/
-
 # Start services
-/etc/init.d/sshd restart
 /etc/init.d/apache restart
-/etc/init.d/collectd restart
-/etc/init.d/squid restart
-
-# remove lm_sensor config after collectd was started
-# to reserch sensors at next boot with updated kernel
-rm -f  /etc/sysconfig/lm_sensors
-
-# Upadate Kernel version uEnv.txt
-if [ -e /boot/uEnv.txt ]; then
-       sed -i -e "s/KVER=.*/KVER=${KVER}/g" /boot/uEnv.txt
-fi
-
-# call user update script (needed for some arm boards)
-if [ -e /boot/pakfire-kernel-update ]; then
-       /boot/pakfire-kernel-update ${KVER}
-fi
+/etc/init.d/vnstatd restart
+/etc/init.d/rngd restart
 
 # This update needs a reboot...
-touch /var/run/need_reboot
+#touch /var/run/need_reboot
 
 # Finish
 /etc/init.d/fireinfo start