kopia lustrzana https://github.com/cyoung/stratux
Remove init.d files from gen_gdl90 process.
rodzic
f4a36b2df7
commit
0f001da912
|
@ -1208,12 +1208,14 @@ 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 {
|
||||||
|
if vtF < 8.0 {
|
||||||
var err_os error
|
var err_os error
|
||||||
if globalStatus.HardwareBuild == "FlightBox" {
|
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.")
|
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.")
|
||||||
|
@ -1221,6 +1223,13 @@ func main() {
|
||||||
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.")
|
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)
|
addSystemError(err_os)
|
||||||
|
} else {
|
||||||
|
// 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")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue