Remove init.d files from gen_gdl90 process.

pull/452/head
Christopher Young 2016-06-24 16:48:48 -04:00
rodzic f4a36b2df7
commit 0f001da912
1 zmienionych plików z 15 dodań i 6 usunięć

Wyświetl plik

@ -1208,19 +1208,28 @@ func main() {
debugLogf = debugLog debugLogf = debugLog
dataLogFilef = dataLogFile dataLogFilef = dataLogFile
} }
//FIXME: All of this should be removed by 08/01/2016.
// Check if Raspbian version is <8.0. Throw a warning if so. // Check if Raspbian version is <8.0. Throw a warning if so.
vt, err := ioutil.ReadFile("/etc/debian_version") vt, err := ioutil.ReadFile("/etc/debian_version")
if err == nil { if err == nil {
vtS := strings.Trim(string(vt), "\n") vtS := strings.Trim(string(vt), "\n")
vtF, err := strconv.ParseFloat(vtS, 32) vtF, err := strconv.ParseFloat(vtS, 32)
if err == nil && vtF < 8.0 { if err == nil {
var err_os error if vtF < 8.0 {
if globalStatus.HardwareBuild == "FlightBox" { var err_os error
err_os = fmt.Errorf("You are running an old Stratux image that can't be updated fully and is now deprecated. Visit https://www.openflightsolutions.com/flightbox/image-update-required for further information.") if globalStatus.HardwareBuild == "FlightBox" {
err_os = fmt.Errorf("You are running an old Stratux image that can't be updated fully and is now deprecated. Visit https://www.openflightsolutions.com/flightbox/image-update-required for further information.")
} else {
err_os = fmt.Errorf("You are running an old Stratux image that can't be updated fully and is now deprecated. Visit http://stratux.me/ to update using the latest release image.")
}
addSystemError(err_os)
} else { } else {
err_os = fmt.Errorf("You are running an old Stratux image that can't be updated fully and is now deprecated. Visit http://stratux.me/ to update using the latest release image.") // Running Jessie or better. Remove some old init.d files.
// This made its way in here because /etc/init.d/stratux invokes the update script, which can't delete the init.d file.
os.Remove("/etc/init.d/stratux")
os.Remove("/etc/rc2.d/S01stratux")
os.Remove("/etc/rc6.d/K01stratux")
} }
addSystemError(err_os)
} }
} }