diff --git a/Makefile b/Makefile
index 7e4f260..b7ad4ed 100644
--- a/Makefile
+++ b/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
diff --git a/data/desktop.map b/data/desktop.map
deleted file mode 100644
index 0caa923..0000000
--- a/data/desktop.map
+++ /dev/null
@@ -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
diff --git a/data/iso.list.d/community.list b/data/iso.list.d/community.list
index 98a8301..a5e2ea7 100644
--- a/data/iso.list.d/community.list
+++ b/data/iso.list.d/community.list
@@ -1,8 +1,12 @@
+bspwm
budgie
cinnamon
deepin
+fluxbox
gnome
i3
+jwm
+lumina
lxde
lxqt
mate
diff --git a/data/iso.list.d/minimal.list b/data/iso.list.d/minimal.list
index 20f9f25..7b4041b 100644
--- a/data/iso.list.d/minimal.list
+++ b/data/iso.list.d/minimal.list
@@ -1,5 +1,7 @@
+budgie-minimal
cinnamon-minimal
+deepin-minimal
+gnome-minimal
kde-minimal
lxqt-minimal
-net-minimal
xfce-minimal
diff --git a/data/iso.list.d/official.list b/data/iso.list.d/official.list
index 971aa05..53f1be0 100644
--- a/data/iso.list.d/official.list
+++ b/data/iso.list.d/official.list
@@ -1,3 +1,3 @@
kde
-net
+netinstall
xfce
diff --git a/data/profile.conf.example b/data/profile.conf.example
index bef60eb..cf59391 100644
--- a/data/profile.conf.example
+++ b/data/profile.conf.example
@@ -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"
diff --git a/data/schemas/bootloader.schema.yaml b/data/schemas/bootloader.schema.yaml
deleted file mode 100644
index 7db9cab..0000000
--- a/data/schemas/bootloader.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/chrootcfg.schema.yaml b/data/schemas/chrootcfg.schema.yaml
deleted file mode 100644
index 0d2d9e2..0000000
--- a/data/schemas/chrootcfg.schema.yaml
+++ /dev/null
@@ -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
diff --git a/data/schemas/displaymanager.schema.yaml b/data/schemas/displaymanager.schema.yaml
deleted file mode 100644
index aeec892..0000000
--- a/data/schemas/displaymanager.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/finished.schema.yaml b/data/schemas/finished.schema.yaml
deleted file mode 100644
index 678423f..0000000
--- a/data/schemas/finished.schema.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-type: map
-mapping:
- "restartNowEnabled": { type: bool, default: true }
- "restartNowChecked": { type: bool, default: false }
- "restartNowCommand": { type: str, required: true }
diff --git a/data/schemas/fstab.schema.yaml b/data/schemas/fstab.schema.yaml
deleted file mode 100644
index 8208361..0000000
--- a/data/schemas/fstab.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/grubcfg.schema.yaml b/data/schemas/grubcfg.schema.yaml
deleted file mode 100644
index 2ed4b1c..0000000
--- a/data/schemas/grubcfg.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/initcpio.schema.yaml b/data/schemas/initcpio.schema.yaml
deleted file mode 100644
index 9a86e50..0000000
--- a/data/schemas/initcpio.schema.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-type: map
-mapping:
- kernel: { type: str, required: true }
diff --git a/data/schemas/keyboard.schema.yaml b/data/schemas/keyboard.schema.yaml
deleted file mode 100644
index 849e629..0000000
--- a/data/schemas/keyboard.schema.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-type: map
-mapping:
- xOrgConfFileName: { type: str, required: true }
- convertedKeymapPath: { type: str, required: true }
diff --git a/data/schemas/license.schema.yaml b/data/schemas/license.schema.yaml
deleted file mode 100644
index 6a898ee..0000000
--- a/data/schemas/license.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/locale.schema.yaml b/data/schemas/locale.schema.yaml
deleted file mode 100644
index bf8c272..0000000
--- a/data/schemas/locale.schema.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-type: map
-mapping:
- "region": { type: str }
- "zone": { type: str }
- "localeGenPath": { type: str, required: true }
- "geoipUrl": { type: str }
diff --git a/data/schemas/luksopenswaphookcfg.schema.yaml b/data/schemas/luksopenswaphookcfg.schema.yaml
deleted file mode 100644
index 29033ae..0000000
--- a/data/schemas/luksopenswaphookcfg.schema.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-type: map
-mapping:
- "configFilePath": { type: str, required: true }
diff --git a/data/schemas/machineid.schema.yaml b/data/schemas/machineid.schema.yaml
deleted file mode 100644
index 660dbf6..0000000
--- a/data/schemas/machineid.schema.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-type: map
-mapping:
- "systemd": { type: bool, default: true }
- "dbus": { type: bool, default: true }
- "symlink": { type: bool, default: true }
diff --git a/data/schemas/mhwdcfg.schema.yaml b/data/schemas/mhwdcfg.schema.yaml
deleted file mode 100644
index 4ca447c..0000000
--- a/data/schemas/mhwdcfg.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/mount.schema.yaml b/data/schemas/mount.schema.yaml
deleted file mode 100644
index bbb8e3b..0000000
--- a/data/schemas/mount.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/netgroups.schema.yaml b/data/schemas/netgroups.schema.yaml
deleted file mode 100644
index b8fdc21..0000000
--- a/data/schemas/netgroups.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/netinstall.schema.yaml b/data/schemas/netinstall.schema.yaml
deleted file mode 100644
index 2a36b37..0000000
--- a/data/schemas/netinstall.schema.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-type: map
-mapping:
- groupsUrl: { type: str, required: true }
diff --git a/data/schemas/packages.schema.yaml b/data/schemas/packages.schema.yaml
deleted file mode 100644
index dfe4801..0000000
--- a/data/schemas/packages.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/partition.schema.yaml b/data/schemas/partition.schema.yaml
deleted file mode 100644
index 8456ee2..0000000
--- a/data/schemas/partition.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/plymouthcfg.schema.yaml b/data/schemas/plymouthcfg.schema.yaml
deleted file mode 100644
index 07b0ee3..0000000
--- a/data/schemas/plymouthcfg.schema.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-type: map
-mapping:
- plymouth_theme: { type: str }
diff --git a/data/schemas/postcfg.schema.yaml b/data/schemas/postcfg.schema.yaml
deleted file mode 100644
index a0d518a..0000000
--- a/data/schemas/postcfg.schema.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-type: map
-mapping:
- "keyrings":
- type: seq
- sequence:
- - { type: str }
- "samba":
- type: seq
- sequence:
- - type: map
- mapping:
- "workgroup": { type: str }
diff --git a/data/schemas/removeuser.schema.yaml b/data/schemas/removeuser.schema.yaml
deleted file mode 100644
index 766b27b..0000000
--- a/data/schemas/removeuser.schema.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-type: map
-mapping:
- "username": { type: str, required: true }
diff --git a/data/schemas/services.schema.yaml b/data/schemas/services.schema.yaml
deleted file mode 100644
index 648ae37..0000000
--- a/data/schemas/services.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/servicescfg.schema.yaml b/data/schemas/servicescfg.schema.yaml
deleted file mode 100644
index cb93af0..0000000
--- a/data/schemas/servicescfg.schema.yaml
+++ /dev/null
@@ -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] }
diff --git a/data/schemas/settings.schema.yaml b/data/schemas/settings.schema.yaml
deleted file mode 100644
index fdb10f5..0000000
--- a/data/schemas/settings.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/umount.schema.yaml b/data/schemas/umount.schema.yaml
deleted file mode 100644
index b0f3bdb..0000000
--- a/data/schemas/umount.schema.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-type: map
-mapping:
- "srcLog": { type: str }
- "destLog": { type: str }
diff --git a/data/schemas/unpackfs.schema.yaml b/data/schemas/unpackfs.schema.yaml
deleted file mode 100644
index 6ec2534..0000000
--- a/data/schemas/unpackfs.schema.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-type: map
-mapping:
- "unpack":
- type: seq
- sequence:
- - type: map
- mapping:
- "source": { type: str }
- "sourcefs": { type: str }
- "destination": { type: str }
diff --git a/data/schemas/users.schema.yaml b/data/schemas/users.schema.yaml
deleted file mode 100644
index 387c4fb..0000000
--- a/data/schemas/users.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/data/schemas/welcome.schema.yaml b/data/schemas/welcome.schema.yaml
deleted file mode 100644
index 905b38c..0000000
--- a/data/schemas/welcome.schema.yaml
+++ /dev/null
@@ -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 }
diff --git a/docbook/profile.conf.xml b/docbook/profile.conf.xml
index ae1b523..6b501f1 100644
--- a/docbook/profile.conf.xml
+++ b/docbook/profile.conf.xml
@@ -90,47 +90,6 @@
-
- default_desktop_executable=
- default_desktop_file=
-
- 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.
-
- default_desktop_executable=startxfce4
- default_desktop_file=xfce
-
- If one or both values are not set or "none" (the default) buildiso
- will try to autodetect the desktop environment.
-
-
- Incomplete list of possible values:
-
-
- 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
-
-
-
-
netinstall=
diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh
index 475a08b..1cc9ce9 100644
--- a/lib/util-iso-image.sh
+++ b/lib/util-iso-image.sh
@@ -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"
diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh
index 73a42e8..a93e934 100644
--- a/lib/util-yaml.sh
+++ b/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
}