forked from mirrored-repos/manjaro-tools
Merge branch 'master' of github.com:manjaro/manjaro-tools into stable-0.13.x
This commit is contained in:
commit
2a3c20e3a9
37 changed files with 49 additions and 586 deletions
35
Makefile
35
Makefile
|
@ -109,39 +109,8 @@ LIBS_YAML = \
|
|||
lib/util-yaml.sh
|
||||
|
||||
SHARED_YAML = \
|
||||
data/desktop.map \
|
||||
data/linux.preset
|
||||
|
||||
SCHEMAS = \
|
||||
data/schemas/bootloader.schema.yaml \
|
||||
data/schemas/chrootcfg.schema.yaml \
|
||||
data/schemas/displaymanager.schema.yaml \
|
||||
data/schemas/finished.schema.yaml \
|
||||
data/schemas/fstab.schema.yaml \
|
||||
data/schemas/grubcfg.schema.yaml \
|
||||
data/schemas/initcpio.schema.yaml \
|
||||
data/schemas/keyboard.schema.yaml \
|
||||
data/schemas/license.schema.yaml \
|
||||
data/schemas/locale.schema.yaml \
|
||||
data/schemas/luksopenswaphookcfg.schema.yaml \
|
||||
data/schemas/machineid.schema.yaml \
|
||||
data/schemas/mhwdcfg.schema.yaml \
|
||||
data/schemas/mount.schema.yaml \
|
||||
data/schemas/netgroups.schema.yaml \
|
||||
data/schemas/netinstall.schema.yaml \
|
||||
data/schemas/packages.schema.yaml \
|
||||
data/schemas/partition.schema.yaml \
|
||||
data/schemas/plymouthcfg.schema.yaml \
|
||||
data/schemas/postcfg.schema.yaml \
|
||||
data/schemas/removeuser.schema.yaml \
|
||||
data/schemas/services.schema.yaml \
|
||||
data/schemas/servicescfg.schema.yaml \
|
||||
data/schemas/settings.schema.yaml \
|
||||
data/schemas/umount.schema.yaml \
|
||||
data/schemas/unpackfs.schema.yaml \
|
||||
data/schemas/users.schema.yaml \
|
||||
data/schemas/welcome.schema.yaml
|
||||
|
||||
all: $(BIN_BASE) $(BIN_PKG) $(BIN_ISO) $(BIN_YAML) doc
|
||||
|
||||
edit = sed -e "s|@datadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \
|
||||
|
@ -236,9 +205,6 @@ install_yaml:
|
|||
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
install -m0644 ${SHARED_YAML} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
|
||||
install -m0644 ${SCHEMAS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
gzip -c man/check-yaml.1 > $(DESTDIR)$(PREFIX)/share/man/man1/check-yaml.1.gz
|
||||
|
||||
|
@ -274,7 +240,6 @@ uninstall_iso:
|
|||
uninstall_yaml:
|
||||
for f in ${BIN_YAML}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||
for f in ${LIBS_YAML}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
||||
for f in ${SCHEMAS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas/$$f; done
|
||||
for f in ${SHARED_YAML}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/check-yaml.1.gz
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
openbox:openbox-session
|
||||
bspwm:bspwm-session
|
||||
jwm:jwm
|
||||
i3:i3
|
||||
fluxbox:startfluxbox
|
||||
pekwm:pekwm
|
||||
plasma:startkde
|
||||
gnome:gnome-session
|
||||
xfce:startxfce4
|
||||
cinnamon:cinnamon-session-cinnamon
|
||||
mate:mate-session
|
||||
enlightenment:enlightenment_start
|
||||
LXDE:lxsession
|
||||
lxqt:lxqt-session
|
||||
pantheon:pantheon-session
|
||||
budgie-desktop:budgie-desktop
|
||||
deepin:startdde
|
||||
Lumina-DE:start-lumina-desktop
|
|
@ -1,8 +1,12 @@
|
|||
bspwm
|
||||
budgie
|
||||
cinnamon
|
||||
deepin
|
||||
fluxbox
|
||||
gnome
|
||||
i3
|
||||
jwm
|
||||
lumina
|
||||
lxde
|
||||
lxqt
|
||||
mate
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
budgie-minimal
|
||||
cinnamon-minimal
|
||||
deepin-minimal
|
||||
gnome-minimal
|
||||
kde-minimal
|
||||
lxqt-minimal
|
||||
net-minimal
|
||||
xfce-minimal
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
kde
|
||||
net
|
||||
netinstall
|
||||
xfce
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# netinstall="false"
|
||||
|
||||
# the default url for the netinstall.yaml
|
||||
# netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinstall"
|
||||
# netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinst"
|
||||
|
||||
# configure calamares to use chrootcfg instead of unpackfs; default: unpackfs
|
||||
# chrootcfg="false"
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
efiBootLoader: { type: str, required: true }
|
||||
kernel: { type: str, required: true }
|
||||
img: { type: str, required: true }
|
||||
fallback: { type: str, required: true }
|
||||
timeout: { type: str, required: true }
|
||||
bootloaderEntryName: { type: str }
|
||||
kernelLine: { type: str, required: true }
|
||||
fallbackKernelLine: { type: str, required: true }
|
||||
grubInstall: { type: str, required: true }
|
||||
grubMkconfig: { type: str, required: true }
|
||||
grubCfg: { type: str, required: true }
|
||||
efiBootloaderId: { type: str }
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
requirements:
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str, required: true }
|
||||
"mode": { type: str, required: true }
|
||||
keyrings:
|
||||
type: seq
|
||||
sequence:
|
||||
- type: str
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"displaymanagers":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str, required: true, enum: [slim, sddm, lightdm, gdm, mdm, lxdm, kdm] }
|
||||
"defaultDesktopEnvironment":
|
||||
type: map
|
||||
mapping:
|
||||
"executable": { type: str }
|
||||
"desktopFile": { type: str }
|
||||
"basicSetup": { type: bool, default: false }
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"restartNowEnabled": { type: bool, default: true }
|
||||
"restartNowChecked": { type: bool, default: false }
|
||||
"restartNowCommand": { type: str, required: true }
|
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"mountOptions":
|
||||
type: map
|
||||
mapping:
|
||||
"default": { type: str, required: true }
|
||||
"btrfs": { type: str, required: true }
|
||||
"ssdExtraMountOptions":
|
||||
type: map
|
||||
mapping:
|
||||
"ext4": { type: str, required: true }
|
||||
"jfs": { type: str, required: true }
|
||||
"xfs": { type: str, required: true }
|
||||
"swap": { type: str, required: true }
|
||||
"btrfs": { type: str, required: true }
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"overwrite": { type: bool, default: false }
|
||||
"defaults":
|
||||
type: map
|
||||
mapping:
|
||||
"GRUB_TIMEOUT": { type: int, required: true }
|
||||
"GRUB_DEFAULT": { type: str, required: true }
|
||||
"GRUB_DISABLE_SUBMENU": { type: bool, default: true }
|
||||
"GRUB_TERMINAL_OUTPUT": { type: str, required: true }
|
||||
"GRUB_DISABLE_RECOVERY": { type: bool, default: true }
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
kernel: { type: str, required: true }
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
xOrgConfFileName: { type: str, required: true }
|
||||
convertedKeymapPath: { type: str, required: true }
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"entries":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"id": { type: str }
|
||||
"name": { type: str }
|
||||
"vendor": { type: str }
|
||||
"type": { type: str }
|
||||
"url": { type: str }
|
||||
"required": { type: bool, default: false }
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"region": { type: str }
|
||||
"zone": { type: str }
|
||||
"localeGenPath": { type: str, required: true }
|
||||
"geoipUrl": { type: str }
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"configFilePath": { type: str, required: true }
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"systemd": { type: bool, default: true }
|
||||
"dbus": { type: bool, default: true }
|
||||
"symlink": { type: bool, default: true }
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"bus":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: str
|
||||
"identifier":
|
||||
type: map
|
||||
mapping:
|
||||
"net":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: int
|
||||
"video":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: int
|
||||
"driver": { type: str, required: true }
|
||||
"local": { type: bool, default: true }
|
||||
"repo": { type: str, required: true }
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"extraMounts":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"device": { type: str, required: true }
|
||||
"fs": { type: str }
|
||||
"mountPoint": { type: str, required: true }
|
||||
"options": { type: str }
|
||||
"extraMountsEfi":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"device": { type: str, required: true }
|
||||
"fs": { type: str }
|
||||
"mountPoint": { type: str, required: true }
|
||||
"options": { type: str }
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str, required: true }
|
||||
"description": { type: str, required: true }
|
||||
"selected": { type: bool, default: false }
|
||||
"hidden": { type: bool, default: false }
|
||||
"packages":
|
||||
type: seq
|
||||
required: true
|
||||
sequence:
|
||||
- { type: text }
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
groupsUrl: { type: str, required: true }
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"backend": { type: str, required: true, enum: [packagekit, zypp, yum, dnf, urpmi, apt, pacman, portage, entropy] }
|
||||
"operations":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"install":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: text }
|
||||
"remove":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: text }
|
||||
"localInstall":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: text }
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
efiSystemPartition: { type: str, required: true }
|
||||
ensureSuspendToDisk: { type: bool, default: true }
|
||||
drawNestedPartitions: { type: bool, default: false }
|
||||
alwaysShowPartitionLabels: { type: bool, default: true }
|
||||
defaultFileSystemType: { type: str, required: true }
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
plymouth_theme: { type: str }
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"keyrings":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str }
|
||||
"samba":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"workgroup": { type: str }
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"username": { type: str, required: true }
|
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"services":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str }
|
||||
"mandatory": { type: bool, default: false }
|
||||
"targets":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str }
|
||||
"mandatory": { type: bool, default: true }
|
||||
"disable":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str }
|
||||
"mandatory": { type: bool, default: false }
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"services":
|
||||
type: map
|
||||
mapping:
|
||||
"enabled":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str }
|
||||
"runlevel": { type: str, enum: [default, sysinit, boot, shutdown, nonetwork] }
|
||||
"disabled":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str }
|
||||
"runlevel": { type: str, enum: [default, sysinit, boot, shutdown, nonetwork] }
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"modules-search":
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str }
|
||||
"instances":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"id": { type: str }
|
||||
"module": { type: str }
|
||||
"config": { type: str }
|
||||
"sequence":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"show":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str, enum: [welcome, netinstall, locale, keyboard, partition, users, summary, finished], unique: true }
|
||||
"exec":
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str, enum: [partition, mount, chrootcfg, unpackfs, networkcfg, machineid, fstab, locale, keyboard, localecfg, luksopenswaphookcfg, luksbootkeyfile, plymouthcfg, initcpiocfg, initcpio, users, displaymanager, mhwdcfg, hwclock, servicescfg, services, grubcfg, bootloader, postcfg, umount, packages, removeuser, dracut], unique: true }
|
||||
"branding": { type: str, required: true }
|
||||
"prompt-install": { type: bool, default: false }
|
||||
"dont-chroot": { type: bool, default: false }
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"srcLog": { type: str }
|
||||
"destLog": { type: str }
|
|
@ -1,11 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"unpack":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"source": { type: str }
|
||||
"sourcefs": { type: str }
|
||||
"destination": { type: str }
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"defaultGroups":
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str }
|
||||
"autologinGroup": { type: str, required: true }
|
||||
"doAutologin": { type: bool, default: true }
|
||||
"sudoersGroup": { type: str, required: true }
|
||||
"setRootPassword": { type: bool, default: true }
|
||||
"doReusePassword": { type: bool, default: true }
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"showSupportUrl": { type: bool, default: true }
|
||||
"showKnownIssuesUrl": { type: bool, default: true }
|
||||
"showReleaseNotesUrl": { type: bool, default: true }
|
||||
"requirements":
|
||||
type: map
|
||||
mapping:
|
||||
"requiredStorage": { type: float, required: true }
|
||||
"requiredRam": { type: float, required: true }
|
||||
"check":
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str, enum: [storage, ram, power, internet, root], unique: true }
|
||||
"required":
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str, enum: [storage, ram, power, internet, root], unique: true }
|
|
@ -90,47 +90,6 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>default_desktop_executable=</varname></term>
|
||||
<term><varname>default_desktop_file=</varname></term>
|
||||
|
||||
<listitem><para>Executable and desktop file used to set witch
|
||||
desktop environment the display manager will run by default.
|
||||
default_desktop_executable= defines a binary in /usr/bin and
|
||||
default_desktop_file a .desktop file in /usr/share/xsessions,
|
||||
skipping the .desktop part.
|
||||
<screen>
|
||||
default_desktop_executable=startxfce4
|
||||
default_desktop_file=xfce
|
||||
</screen>
|
||||
If one or both values are not set or "none" (the default) buildiso
|
||||
will try to autodetect the desktop environment.
|
||||
</para>
|
||||
<para>
|
||||
Incomplete list of possible values:
|
||||
</para>
|
||||
<screen>
|
||||
Desktop Desktop executable Desktop file
|
||||
--------------------------------------------------------
|
||||
Budgie budgie-session budgie-session
|
||||
Cinnamon cinnamon-session cinnamon-session
|
||||
Enlightenment enlightenment_start enlightenment
|
||||
Gnome gnome-session gnome
|
||||
i3 i3 i3
|
||||
KDE Plasma 4 startkde kde-plasma
|
||||
KDE Plasma 5 startkde plasma
|
||||
LXDE lxsession LXDE
|
||||
LXDE startlxde LXDE
|
||||
LXQt lxqt-session lxqt
|
||||
Mate mate-session mate
|
||||
Openbox openbox-session openbox
|
||||
Pantheon pantheon-session pantheon
|
||||
PekWM pekwm pekwm
|
||||
Xfce startxfce4 xfce
|
||||
</screen>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>netinstall=</varname></term>
|
||||
|
||||
|
|
|
@ -161,18 +161,11 @@ write_live_session_conf(){
|
|||
echo '' >> ${conf}
|
||||
echo '# live group membership' >> ${conf}
|
||||
echo "addgroups='${addgroups}'" >> ${conf}
|
||||
echo '' >> ${conf}
|
||||
echo '# iso name' >> ${conf}
|
||||
echo "iso_name=${iso_name}" >> ${conf}
|
||||
echo '' >> ${conf}
|
||||
echo '# default_desktop_file' >> ${conf}
|
||||
echo "default_desktop_file=${default_desktop_file}" >> ${conf}
|
||||
echo '' >> ${conf}
|
||||
echo '# default_desktop_executable' >> ${conf}
|
||||
echo "default_desktop_executable=${default_desktop_executable}" >> ${conf}
|
||||
echo '' >> ${conf}
|
||||
echo '# samba workgroup' >> ${conf}
|
||||
echo "smb_workgroup=${smb_workgroup}" >> ${conf}
|
||||
if [[ -n ${smb_workgroup} ]];then
|
||||
echo '' >> ${conf}
|
||||
echo '# samba workgroup' >> ${conf}
|
||||
echo "smb_workgroup=${smb_workgroup}" >> ${conf}
|
||||
fi
|
||||
}
|
||||
|
||||
configure_hosts(){
|
||||
|
@ -203,7 +196,6 @@ configure_system(){
|
|||
|
||||
configure_live_image(){
|
||||
msg "Configuring [live-image]"
|
||||
detect_desktop_env "$1"
|
||||
configure_hosts "$1"
|
||||
configure_lsb "$1"
|
||||
configure_mhwd "$1"
|
||||
|
|
159
lib/util-yaml.sh
159
lib/util-yaml.sh
|
@ -9,38 +9,6 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
load_desktop_map(){
|
||||
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
|
||||
file=${DATADIR}/desktop.map
|
||||
local desktop_map=$(sed "$_com_rm" "$file" \
|
||||
| sed "$_space" \
|
||||
| sed "$_clean")
|
||||
echo ${desktop_map}
|
||||
}
|
||||
|
||||
detect_desktop_env(){
|
||||
local xs=$1/usr/share/xsessions ex=$1/usr/bin key val map=( $(load_desktop_map) )
|
||||
default_desktop_file="none"
|
||||
default_desktop_executable="none"
|
||||
for item in "${map[@]}";do
|
||||
key=${item%:*}
|
||||
val=${item#*:}
|
||||
if [[ -f $xs/$key.desktop ]] && [[ -f $ex/$val ]];then
|
||||
default_desktop_file="$key"
|
||||
default_desktop_executable="$val"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
is_valid_de(){
|
||||
if [[ ${default_desktop_executable} != "none" ]] && \
|
||||
[[ ${default_desktop_file} != "none" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
write_machineid_conf(){
|
||||
local conf="${modules_dir}/machineid.conf" switch='false'
|
||||
msg2 "Writing %s ..." "${conf##*/}"
|
||||
|
@ -141,24 +109,13 @@ write_displaymanager_conf(){
|
|||
local conf="${modules_dir}/displaymanager.conf"
|
||||
msg2 "Writing %s ..." "${conf##*/}"
|
||||
echo "---" > "$conf"
|
||||
if ${chrootcfg}; then
|
||||
echo "displaymanagers:" >> "$conf"
|
||||
echo " - lightdm" >> "$conf"
|
||||
echo " - gdm" >> "$conf"
|
||||
echo " - mdm" >> "$conf"
|
||||
echo " - sddm" >> "$conf"
|
||||
echo " - lxdm" >> "$conf"
|
||||
echo " - slim" >> "$conf"
|
||||
else
|
||||
echo "displaymanagers:" >> "$conf"
|
||||
echo " - ${displaymanager}" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
if $(is_valid_de); then
|
||||
echo "defaultDesktopEnvironment:" >> "$conf"
|
||||
echo " executable: \"${default_desktop_executable}\"" >> "$conf"
|
||||
echo " desktopFile: \"${default_desktop_file}\"" >> "$conf"
|
||||
fi
|
||||
fi
|
||||
echo "displaymanagers:" >> "$conf"
|
||||
echo " - lightdm" >> "$conf"
|
||||
echo " - gdm" >> "$conf"
|
||||
echo " - mdm" >> "$conf"
|
||||
echo " - sddm" >> "$conf"
|
||||
echo " - lxdm" >> "$conf"
|
||||
echo " - slim" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
echo "basicSetup: false" >> "$conf"
|
||||
}
|
||||
|
@ -249,17 +206,13 @@ write_mhwdcfg_conf(){
|
|||
echo " - 302" >> "$conf"
|
||||
echo " - 380" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
if ${nonfree_mhwd};then
|
||||
echo "driver: nonfree" >> "$conf"
|
||||
else
|
||||
echo "driver: free" >> "$conf"
|
||||
fi
|
||||
local drv="free"
|
||||
${nonfree_mhwd} && drv="nonfree"
|
||||
echo "driver: ${drv}" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
if ${chrootcfg};then
|
||||
echo "local: false" >> "$conf"
|
||||
else
|
||||
echo "local: true" >> "$conf"
|
||||
fi
|
||||
local switch='true'
|
||||
${chrootcfg} && switch='false'
|
||||
echo "local: ${switch}" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
echo 'repo: /opt/pacman-mhwd.conf' >> "$conf"
|
||||
}
|
||||
|
@ -326,19 +279,16 @@ write_settings_conf(){
|
|||
echo "---" > "$conf"
|
||||
echo "modules-search: [ local ]" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
echo "instances:" >> "$conf"
|
||||
echo '# - id: owncloud' >> "$conf"
|
||||
echo '# module: webview' >> "$conf"
|
||||
echo '# config: owncloud.conf' >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
echo "sequence:" >> "$conf"
|
||||
echo " - show:" >> "$conf"
|
||||
echo " - welcome" >> "$conf"
|
||||
echo " - locale" >> "$conf"
|
||||
echo " - welcome" >> "$conf" && write_welcome_conf
|
||||
echo " - locale" >> "$conf" && write_locale_conf
|
||||
echo " - keyboard" >> "$conf"
|
||||
echo " - partition" >> "$conf"
|
||||
echo " - users" >> "$conf"
|
||||
${netinstall} && echo " - netinstall" >> "$conf"
|
||||
echo " - users" >> "$conf" && write_users_conf
|
||||
if ${netinstall};then
|
||||
echo " - netinstall" >> "$conf" && write_netinstall_conf
|
||||
fi
|
||||
echo " - summary" >> "$conf"
|
||||
echo " - exec:" >> "$conf"
|
||||
echo " - partition" >> "$conf"
|
||||
|
@ -348,38 +298,38 @@ write_settings_conf(){
|
|||
echo " - chrootcfg" >> "$conf"
|
||||
echo " - networkcfg" >> "$conf"
|
||||
else
|
||||
echo " - unpackfs" >> "$conf"
|
||||
echo " - unpackfs" >> "$conf" && write_unpack_conf
|
||||
echo " - networkcfg" >> "$conf"
|
||||
echo " - packages" >> "$conf"
|
||||
echo " - packages" >> "$conf" && write_packages_conf
|
||||
fi
|
||||
else
|
||||
echo " - unpackfs" >> "$conf"
|
||||
echo " - unpackfs" >> "$conf" && write_unpack_conf
|
||||
echo " - networkcfg" >> "$conf"
|
||||
fi
|
||||
echo " - machineid" >> "$conf"
|
||||
echo " - machineid" >> "$conf" && write_machineid_conf
|
||||
echo " - fstab" >> "$conf"
|
||||
echo " - locale" >> "$conf"
|
||||
echo " - keyboard" >> "$conf"
|
||||
echo " - localecfg" >> "$conf"
|
||||
echo " - luksopenswaphookcfg" >> "$conf"
|
||||
echo " - luksbootkeyfile" >> "$conf"
|
||||
echo " - plymouthcfg" >> "$conf"
|
||||
echo " - plymouthcfg" >> "$conf" && write_plymouthcfg_conf
|
||||
echo " - initcpiocfg" >> "$conf"
|
||||
echo " - initcpio" >> "$conf"
|
||||
echo " - initcpio" >> "$conf" && write_initcpio_conf
|
||||
echo " - users" >> "$conf"
|
||||
echo " - displaymanager" >> "$conf"
|
||||
echo " - mhwdcfg" >> "$conf"
|
||||
echo " - displaymanager" >> "$conf" && write_displaymanager_conf
|
||||
echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf
|
||||
echo " - hwclock" >> "$conf"
|
||||
case ${initsys} in
|
||||
'systemd') echo " - services" >> "$conf" ;;
|
||||
'openrc') echo " - servicescfg" >> "$conf" ;;
|
||||
'systemd') echo " - services" >> "$conf" && write_services_conf ;;
|
||||
'openrc') echo " - servicescfg" >> "$conf" && write_servicescfg_conf ;;
|
||||
esac
|
||||
echo " - grubcfg" >> "$conf"
|
||||
echo " - bootloader" >> "$conf"
|
||||
echo " - postcfg" >> "$conf"
|
||||
echo " - bootloader" >> "$conf" && write_bootloader_conf
|
||||
echo " - postcfg" >> "$conf" && write_postcfg_conf
|
||||
echo " - umount" >> "$conf"
|
||||
echo " - show:" >> "$conf"
|
||||
echo " - finished" >> "$conf"
|
||||
echo " - finished" >> "$conf" && write_finished_conf
|
||||
echo '' >> "$conf"
|
||||
echo "branding: ${iso_name}" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
|
@ -390,49 +340,9 @@ write_settings_conf(){
|
|||
|
||||
configure_calamares(){
|
||||
info "Configuring [Calamares]"
|
||||
|
||||
modules_dir=$1/etc/calamares/modules
|
||||
|
||||
mkdir -p ${modules_dir}
|
||||
|
||||
prepare_dir "${modules_dir}"
|
||||
write_settings_conf "$1"
|
||||
|
||||
write_locale_conf
|
||||
|
||||
write_welcome_conf
|
||||
|
||||
if ${netinstall};then
|
||||
write_netinstall_conf
|
||||
if ! ${chrootcfg}; then
|
||||
write_packages_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
write_bootloader_conf
|
||||
|
||||
write_mhwdcfg_conf
|
||||
|
||||
write_unpack_conf
|
||||
|
||||
write_displaymanager_conf
|
||||
|
||||
write_initcpio_conf
|
||||
|
||||
write_machineid_conf
|
||||
|
||||
write_finished_conf
|
||||
|
||||
write_plymouthcfg_conf
|
||||
|
||||
write_postcfg_conf
|
||||
|
||||
case ${initsys} in
|
||||
'systemd') write_services_conf ;;
|
||||
'openrc') write_servicescfg_conf ;;
|
||||
esac
|
||||
|
||||
write_users_conf
|
||||
|
||||
info "Done configuring [Calamares]"
|
||||
}
|
||||
|
||||
|
@ -450,7 +360,8 @@ check_yaml(){
|
|||
# cp $1 $data
|
||||
;;
|
||||
esac
|
||||
schema=${DATADIR}/schemas/$name.schema.yaml
|
||||
local schemas_dir=/usr/share/calamares/schemas
|
||||
schema=${schemas_dir}/$name.schema.yaml
|
||||
# pykwalify -d $data -s $schema
|
||||
kwalify -lf $schema $data
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue