diff --git a/pmb/config/init.py b/pmb/config/init.py index e3e92be1..278b0503 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -357,7 +357,7 @@ def frontend(args): " or \"none\"") extra = pmb.helpers.cli.ask(args, "Extra packages", None, args.extra_packages, - validation_regex="^([-.+\w]+)(,[-.+\w]+)*$") + validation_regex=r"^([-.+\w]+)(,[-.+\w]+)*$") cfg["pmbootstrap"]["extra_packages"] = extra # Configure timezone info diff --git a/pmb/install/_install.py b/pmb/install/_install.py index cb8dbf0c..a4a022db 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -170,7 +170,7 @@ def configure_apk(args): pmb.helpers.run.root(args, ["cp", key, rootfs + "/etc/apk/keys/"]) # Disable pmbootstrap repository - pmb.helpers.run.root(args, ["sed", "-i", "/\/mnt\/pmbootstrap-packages/d", + pmb.helpers.run.root(args, ["sed", "-i", r"/\/mnt\/pmbootstrap-packages/d", rootfs + "/etc/apk/repositories"]) pmb.helpers.run.user(args, ["cat", rootfs + "/etc/apk/repositories"]) @@ -281,7 +281,7 @@ def setup_hostname(args): suffix = "rootfs_" + args.device pmb.chroot.root(args, ["sh", "-c", "echo " + shlex.quote(hostname) + " > /etc/hostname"], suffix) - regex = ("s/^127\.0\.0\.1.*/127.0.0.1\t" + re.escape(hostname) + + regex = (r"s/^127\.0\.0\.1.*/127.0.0.1\t" + re.escape(hostname) + " localhost.localdomain localhost/") pmb.chroot.root(args, ["sed", "-i", "-e", regex, "/etc/hosts"], suffix)