aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2025-08-16 14:03:17 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2025-08-16 16:22:31 +0100
commitf7ecc2ebd7bf04ced5b7b1cabdaeb237cd6a8335 (patch)
tree6929a7ced3a46bcab93417ba9320170e804d21b7
parent166a9ae8efddeb7d134ee5f1c0cadea314880dea (diff)
downloadkutter-f7ecc2ebd7bf04ced5b7b1cabdaeb237cd6a8335.tar.gz
kutter-f7ecc2ebd7bf04ced5b7b1cabdaeb237cd6a8335.tar.xz
kutter-f7ecc2ebd7bf04ced5b7b1cabdaeb237cd6a8335.zip
/var/run/kutter/saved.cfg -> /var/lib/kutter/saved.cfg
/var/run which is just a symlink to /run in most places is not normally persistent so this was the wrong place for it
-rw-r--r--CHANGELOG.md2
-rw-r--r--klippy/configfile.py4
-rw-r--r--klippy/klippy.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4cfce6c..75d478c0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,7 +16,7 @@ Most changes are breaking.
### Changed
* The config file is no longer modified by `SAVE_CONFIG`. Instead the file
- `/var/run/kutter/saved.cfg` will contain the data which previously would be
+ `/var/lib/kutter/saved.cfg` will contain the data which previously would be
placed at the end of `SAVE_CONFIG`. The `--saved-config` (short: `-S`)
option can be used to change the location.
* The makefiles in `klippy/chelper` and `lib/hub-ctrl` are now used to build he
diff --git a/klippy/configfile.py b/klippy/configfile.py
index 879a7d63..e56e8d86 100644
--- a/klippy/configfile.py
+++ b/klippy/configfile.py
@@ -373,7 +373,7 @@ class ConfigAutoSave:
def load_main_config(self):
regular_filename = self.printer.get_start_args()["config_file"]
- autosave_filename = self.printer.get_start_args()["runtime_config"]
+ autosave_filename = self.printer.get_start_args()["saved_config"]
cfgrdr = ConfigFileReader()
regular_data = cfgrdr.read_config_file(regular_filename)
# TODO: TOCTOU - future refactor
@@ -448,7 +448,7 @@ class ConfigAutoSave:
# read. But maybe there should be a warning either here or at load as
# there's no feedback mechanism anymore.
autosave_data = cfgrdr.build_config_string(self.fileconfig)
- autosave_filename = self.printer.get_start_args()["runtime_config"]
+ autosave_filename = self.printer.get_start_args()["saved_config"]
# Determine filenames
datestr = time.strftime("-%Y%m%d_%H%M%S")
backup_name = autosave_filename + datestr
diff --git a/klippy/klippy.py b/klippy/klippy.py
index f0092416..f4d5a30f 100644
--- a/klippy/klippy.py
+++ b/klippy/klippy.py
@@ -318,7 +318,7 @@ def main():
opts.add_option(
"-S",
"--saved-config",
- default="/var/run/kutter/saved.cfg",
+ default="/var/lib/kutter/saved.cfg",
help="path to where SAVE_CONFIG should save configuration",
)
opts.add_option(
@@ -369,7 +369,7 @@ def main():
logging.info("Starting Klippy...")
start_args["software_version"] = __version__
start_args["cpu_info"] = util.get_cpu_info()
- start_args["runtime_config"] = options.runtime_config
+ start_args["saved_config"] = options.saved_config
versions = "\n".join(
[
"Args: %s" % (sys.argv,),