fix timezone and console keymap
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 17s
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 17s
This commit is contained in:
parent
ad6d62cd8c
commit
fb718b11a3
2
.github/release-nest-v3
vendored
2
.github/release-nest-v3
vendored
@ -1 +1 @@
|
|||||||
3
|
4
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pikainstall (2.0.0-101pika1) pika; urgency=medium
|
pikainstall (2.0.0-101pika2) pika; urgency=medium
|
||||||
|
|
||||||
* Adapt to new installer
|
* Adapt to new installer
|
||||||
|
|
||||||
|
@ -53,14 +53,25 @@ locale-gen
|
|||||||
update-locale LANG={LOCALE}
|
update-locale LANG={LOCALE}
|
||||||
touch /etc/default/keyboard
|
touch /etc/default/keyboard
|
||||||
echo 'XKBMODEL="pc105"' > /etc/default/keyboard
|
echo 'XKBMODEL="pc105"' > /etc/default/keyboard
|
||||||
echo 'XKBLAYOUT="{KEYBOARD}"' >> /etc/default/keyboard
|
echo 'XKBLAYOUT="{XKBLAYOUT}"' >> /etc/default/keyboard
|
||||||
echo 'XKBVARIANT="{KVARIANT}"' >> /etc/default/keyboard
|
echo 'XKBVARIANT="{XKBVARIANT}"' >> /etc/default/keyboard
|
||||||
echo 'XKBOPTIONS=""' >> /etc/default/keyboard
|
echo 'XKBOPTIONS=""' >> /etc/default/keyboard
|
||||||
echo 'BACKSPACE="guess"' >> /etc/default/keyboard
|
echo 'BACKSPACE="guess"' >> /etc/default/keyboard
|
||||||
echo 'KEYMAP={KEYBOARD}' >> /etc/default/keyboard
|
echo 'KEYMAP={KEYMAP}' >> /etc/default/keyboard
|
||||||
cp -fv /etc/default/keyboard /etc/vconsole.conf
|
cp -fv /etc/default/keyboard /etc/vconsole.conf
|
||||||
localectl set-locale LANG={LOCALE}
|
localectl set-locale LANG={LOCALE}
|
||||||
timedatectl set-timezone {TIMEZONE}
|
timedatectl set-timezone {TIMEZONE}
|
||||||
|
ln -sf /usr/share/zoneinfo/{TIMEZONE} /etc/localtime
|
||||||
|
hwclock --systohc || true
|
||||||
|
mkdir -p /etc/X11/xorg.conf.d/
|
||||||
|
echo 'Section "InputClass"' > /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo ' Identifier "system-keyboard"' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo ' MatchIsKeyboard "on"' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo ' Option "XkbLayout" "{XKBLAYOUT}"' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo ' Option "XkbModel" "pc105"' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo ' Option "XkbVariant" "{XKBVARIANT}"' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo ' Option "XkbOptions" ""' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
|
echo 'EndSection' >> /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Global Functions
|
# Global Functions
|
||||||
@ -85,11 +96,12 @@ def silentremove(filename):
|
|||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("-r", "--root", help="The Path where root is mounted to.", metavar="/mnt/root", default=argparse.SUPPRESS, required=True, nargs=1)
|
parser.add_argument("-r", "--root", help="The Path where root is mounted to.", metavar="/mnt/root", default=argparse.SUPPRESS, required=True, nargs=1)
|
||||||
parser.add_argument("-l", "--locale", help="Choose what locale/language to use.", metavar="en_US.UTF-8", default=argparse.SUPPRESS, required=True, nargs=1)
|
parser.add_argument("-l", "--locale", help="Choose what locale/language to use.", metavar="en_US.UTF-8", default=argparse.SUPPRESS, required=True, nargs=1)
|
||||||
parser.add_argument("-k", "--keyboard", help="Choose what keyboard layout to use.", metavar="us", default=argparse.SUPPRESS, required=True, nargs=1)
|
parser.add_argument("-k", "--keymap", help="Choose what keymap to use.", metavar="us", default=argparse.SUPPRESS, required=True, nargs=1)
|
||||||
parser.add_argument("-c", "--cryptkey", help="Luks passkey to /home.", metavar="password123", default=None, nargs=1)
|
parser.add_argument("-c", "--cryptkey", help="Luks passkey to /home.", metavar="password123", default=None, nargs=1)
|
||||||
parser.add_argument("-m", "--manual", help="Is this a manual install for gui.", metavar="0", default=None, nargs=1)
|
parser.add_argument("-m", "--manual", help="Is this a manual install for gui.", metavar="0", default=None, nargs=1)
|
||||||
parser.add_argument("-t", "--timezone", help="Choose what timezone to use.", metavar="America/New_York", default=argparse.SUPPRESS, required=True, nargs=1)
|
parser.add_argument("-t", "--timezone", help="Choose what timezone to use.", metavar="America/New_York", default=argparse.SUPPRESS, required=True, nargs=1)
|
||||||
parser.add_argument("-kv", "--kvariant", help="Choose what keyboard variant to use.", metavar="dvorak", default=None, nargs=1)
|
parser.add_argument("-kl", "--klayout", help="Choose what XKB Keyboard layout to use.", metavar="us", default=argparse.SUPPRESS, required=True, nargs=1)
|
||||||
|
parser.add_argument("-kv", "--kvariant", help="Choose what XKB Keyboard variant to use.", metavar="dvorak", default=None, nargs=1)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Print all command-line arguments.
|
# Print all command-line arguments.
|
||||||
@ -271,9 +283,10 @@ if args.kvariant is not None:
|
|||||||
with open(CHROOT_LANG_FILE_PATH, "w") as file:
|
with open(CHROOT_LANG_FILE_PATH, "w") as file:
|
||||||
lang_crypttab_file = _LANG_SETUP_FILE.format(
|
lang_crypttab_file = _LANG_SETUP_FILE.format(
|
||||||
LOCALE=listToString(args.locale),
|
LOCALE=listToString(args.locale),
|
||||||
KEYBOARD=listToString(args.keyboard),
|
XKBLAYOUT=listToString(args.klayout),
|
||||||
|
XKBVARIANT=listToString(args.kvariant),
|
||||||
|
KEYMAP=listToString(args.keymap),
|
||||||
TIMEZONE=listToString(args.timezone),
|
TIMEZONE=listToString(args.timezone),
|
||||||
KVARIANT=listToString(args.kvariant),
|
|
||||||
)
|
)
|
||||||
file.write(lang_crypttab_file)
|
file.write(lang_crypttab_file)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user