Added a new dracut script to overwrite keymap/locale settings in NEWROOT.
This commit is contained in:
parent
7045698d74
commit
a45a0d1448
3
Makefile
3
Makefile
@ -9,8 +9,7 @@ install: all
|
||||
install -d $(DESTDIR)$(SBINDIR)
|
||||
install -m755 mklive.sh $(DESTDIR)$(SBINDIR)/void-mklive
|
||||
install -d $(DESTDIR)$(DRACUTMODDIR)
|
||||
install -m755 dracut/module-setup.sh $(DESTDIR)$(DRACUTMODDIR)
|
||||
install -m755 dracut/vmklive-adduser.sh $(DESTDIR)$(DRACUTMODDIR)
|
||||
install -m755 dracut/*.sh $(DESTDIR)$(DRACUTMODDIR)
|
||||
|
||||
clean:
|
||||
-rm -f mklive.sh
|
||||
|
@ -13,4 +13,5 @@ depends() {
|
||||
install() {
|
||||
inst chmod
|
||||
inst_hook pre-pivot 01 "$moddir/vmklive-adduser.sh"
|
||||
inst_hook pre-pivot 02 "$moddir/vmklive-conf.sh"
|
||||
}
|
||||
|
25
dracut/vmklive-conf.sh
Normal file
25
dracut/vmklive-conf.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
KEYMAP=$(getarg vconsole.keymap)
|
||||
FONT=$(getarg vconsole.font)
|
||||
FONT_MAP=$(getarg vconsole.font.map)
|
||||
FONT_UNIMAP=$(getarg vconsole.font.unimap)
|
||||
LOCALE=$(getarg locale.LANG)
|
||||
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
sed -i -e "s|^KEYMAP=.*|KEYMAP=$KEYMAP|g" ${NEWROOT}/etc/vconsole.conf
|
||||
fi
|
||||
if [ -n "$FONT" ]; then
|
||||
sed -i -e "s|^FONT=.*|FONT=$FONT|g" ${NEWROOT}/etc/vconsole.conf
|
||||
fi
|
||||
if [ -n "$FONT_MAP" ]; then
|
||||
sed -i -e "s|^FONT_MAP=.*|FONT_MAP=$FONT_MAP|g" ${NEWROOT}/etc/vconsole.conf
|
||||
fi
|
||||
if [ -n "$FONT_UNIMAP" ]; then
|
||||
sed -i -e "s|^FONT_UNIMAP=.*|FONT_UNIMAP=$FONT_UNIMAP|g" ${NEWROOT}/etc/vconsole.conf
|
||||
fi
|
||||
if [ -n "$LOCALE" ]; then
|
||||
sed -i -e "s|^LANG=.*|LANG=$LOCALE|g" ${NEWROOT}/etc/locale.conf
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user