From b611615dce10949255d0d60bd2b1dca9152c9b53 Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Fri, 24 Jun 2016 15:51:04 -0400 Subject: [PATCH] Don't delete init.d script in .sh update unless running Jessie. #448. --- selfupdate/update_footer.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/selfupdate/update_footer.sh b/selfupdate/update_footer.sh index 84fb8a0e..49fb8139 100755 --- a/selfupdate/update_footer.sh +++ b/selfupdate/update_footer.sh @@ -4,9 +4,14 @@ cp -f libimu.so /usr/lib/libimu.so # Startup script. -rm -f /etc/init.d/stratux -rm -f /etc/rc2.d/S01stratux -rm -f /etc/rc6.d/K01stratux +RASPBIAN_VERSION=`cat /etc/debian_version` +if [ "$RASPBIAN_VERSION" == "8.0" ] ; then + # Install the systemd startup scripts in any case, even if they won't be used. If this is being run, then the old init.d script + # is still intact and we just leave it. If running Wheezy, then remove the old init.d script. + rm -f /etc/init.d/stratux + rm -f /etc/rc2.d/S01stratux + rm -f /etc/rc6.d/K01stratux +fi cp -f __lib__systemd__system__stratux.service /lib/systemd/system/stratux.service cp -f __root__stratux-pre-start.sh /root/stratux-pre-start.sh