diff --git a/MAVProxy/mavproxy.py b/MAVProxy/mavproxy.py index 4418e922fb..b248ea52aa 100644 --- a/MAVProxy/mavproxy.py +++ b/MAVProxy/mavproxy.py @@ -1338,6 +1338,7 @@ def run_startup_scripts(): parser.add_option("--default-modules", default="log,signing,wp,rally,fence,ftp,param,relay,tuneopt,arm,mode,calibration,rc,auxopt,misc,cmdlong,battery,terrain,output,adsb,layout", help='default module list') parser.add_option("--udp-timeout",dest="udp_timeout", default=0.0, type='float', help="Timeout for udp clients in seconds") parser.add_option("--retries", type=int, help="number of times to retry connection", default=3) + parser.add_option("--no-startup-scripts", action='store_true', help="Do not run .mavinit.scr and other startup scripts") (opts, args) = parser.parse_args() if len(args) != 0: @@ -1519,7 +1520,8 @@ def quit_handler(signum = None, frame = None): elif opts.aircraft is not None: mpstate.aircraft_dir = opts.aircraft - run_startup_scripts() + if not opts.no_startup_scripts: + run_startup_scripts() if opts.cmd is not None: for cstr in opts.cmd: