From 820b7dcaf0515c8c1c59e1d87185401693b0cf52 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 5 Mar 2018 23:44:04 +0000 Subject: Add draklive2 examples. --- examples/gui/files/50-disable-suspend.pkla | 6 ++++++ examples/gui/files/blacklist-ide.conf | 2 ++ examples/gui/files/dracut-live.conf | 16 +++++++++++++++ .../gui/files/draklive-install.d/finish-install | 13 ++++++++++++ examples/gui/files/draklive-install.d/firstboot | 1 + .../run.d/home-live-permissions.sh | 5 +++++ examples/gui/files/draklive-install.d/services | 2 ++ examples/gui/files/empty.conf | 0 examples/gui/files/finish-install | 7 +++++++ examples/gui/files/firstboot | 1 + examples/gui/files/halt-local.service | 23 +++++++++++++++++++++ examples/gui/files/halt.local | 24 ++++++++++++++++++++++ examples/gui/files/mgaonlinerc | 1 + 13 files changed, 101 insertions(+) create mode 100755 examples/gui/files/50-disable-suspend.pkla create mode 100644 examples/gui/files/blacklist-ide.conf create mode 100644 examples/gui/files/dracut-live.conf create mode 100644 examples/gui/files/draklive-install.d/finish-install create mode 100644 examples/gui/files/draklive-install.d/firstboot create mode 100755 examples/gui/files/draklive-install.d/run.d/home-live-permissions.sh create mode 100644 examples/gui/files/draklive-install.d/services create mode 100644 examples/gui/files/empty.conf create mode 100644 examples/gui/files/finish-install create mode 100644 examples/gui/files/firstboot create mode 100644 examples/gui/files/halt-local.service create mode 100755 examples/gui/files/halt.local create mode 100644 examples/gui/files/mgaonlinerc (limited to 'examples/gui/files') diff --git a/examples/gui/files/50-disable-suspend.pkla b/examples/gui/files/50-disable-suspend.pkla new file mode 100755 index 0000000..7c92300 --- /dev/null +++ b/examples/gui/files/50-disable-suspend.pkla @@ -0,0 +1,6 @@ +[Disable Suspend] +Identity=unix-user:* +Action=org.freedesktop.upower.hibernate;org.freedesktop.upower.suspend +ResultAny=no +ResultInactive=no +ResultActive=no diff --git a/examples/gui/files/blacklist-ide.conf b/examples/gui/files/blacklist-ide.conf new file mode 100644 index 0000000..146e357 --- /dev/null +++ b/examples/gui/files/blacklist-ide.conf @@ -0,0 +1,2 @@ +# temp fix for 3395 +blacklist pata_acpi diff --git a/examples/gui/files/dracut-live.conf b/examples/gui/files/dracut-live.conf new file mode 100644 index 0000000..42b3e24 --- /dev/null +++ b/examples/gui/files/dracut-live.conf @@ -0,0 +1,16 @@ +# it is a live, build initrd to boot any hardware +hostonly="no" +# load mga livecd support +add_dracutmodules+=" mgalive " +# block some dracut modules we dont want / use +omit_dracutmodules+=" caps crypt dm dmraid mdraid lvm nfs i18n resume modsign " +# compress initrd with xz +compress_l="xz" +# whitelist only the filesystems needed by live CDs and live USB +filesystems="iso9660 vfat =fs/nls squashfs overlay" +# ensure drm drivers are available early in the boot sequence +add_drivers+=" amdgpu radeon nouveau i915 vboxvideo " +# fibre channel & iSCSI modules are unneeded on live CD/USB and pull 1MB+ of firmware files +omit_drivers+=" qla1280 qla2xxx qla4xxx " +# pata_acpi is not wanted on boot +omit_drivers+=" pata_acpi " diff --git a/examples/gui/files/draklive-install.d/finish-install b/examples/gui/files/draklive-install.d/finish-install new file mode 100644 index 0000000..28fe550 --- /dev/null +++ b/examples/gui/files/draklive-install.d/finish-install @@ -0,0 +1,13 @@ +FINISH_INSTALL=yes +LICENSE=no +LANGUAGE=no +KEYBOARD=no +TIMEZONE=no +COUNTRY=no +NETWORK=yes +URPMI=yes +AUTHENTICATION=no +USERS=with_root +USER_RENAME_FROM=DEFAULT_USER +USER_AUTOLOGIN_FIRST=no +GLX=no diff --git a/examples/gui/files/draklive-install.d/firstboot b/examples/gui/files/draklive-install.d/firstboot new file mode 100644 index 0000000..a842497 --- /dev/null +++ b/examples/gui/files/draklive-install.d/firstboot @@ -0,0 +1 @@ +FIRSTBOOT=no diff --git a/examples/gui/files/draklive-install.d/run.d/home-live-permissions.sh b/examples/gui/files/draklive-install.d/run.d/home-live-permissions.sh new file mode 100755 index 0000000..efc7d05 --- /dev/null +++ b/examples/gui/files/draklive-install.d/run.d/home-live-permissions.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -d "/home/live" ]; then + /usr/bin/chown -R live:live /home/live +fi diff --git a/examples/gui/files/draklive-install.d/services b/examples/gui/files/draklive-install.d/services new file mode 100644 index 0000000..8a4c0de --- /dev/null +++ b/examples/gui/files/draklive-install.d/services @@ -0,0 +1,2 @@ +crond +msec diff --git a/examples/gui/files/empty.conf b/examples/gui/files/empty.conf new file mode 100644 index 0000000..e69de29 diff --git a/examples/gui/files/finish-install b/examples/gui/files/finish-install new file mode 100644 index 0000000..fed1dd5 --- /dev/null +++ b/examples/gui/files/finish-install @@ -0,0 +1,7 @@ +FINISH_INSTALL=yes +NETWORK=no +URPMI=no +AUTHENTICATION=no +USERS=no +TIMEZONE=simplified +COUNTRY=simplified diff --git a/examples/gui/files/firstboot b/examples/gui/files/firstboot new file mode 100644 index 0000000..a842497 --- /dev/null +++ b/examples/gui/files/firstboot @@ -0,0 +1 @@ +FIRSTBOOT=no diff --git a/examples/gui/files/halt-local.service b/examples/gui/files/halt-local.service new file mode 100644 index 0000000..bc7f284 --- /dev/null +++ b/examples/gui/files/halt-local.service @@ -0,0 +1,23 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=/sbin/halt.local Compatibility +ConditionFileIsExecutable=/sbin/halt.local +DefaultDependencies=no +After=shutdown.target +Before=final.target + +[Service] +Type=oneshot +ExecStartPre=-/bin/kill -54 1 +ExecStartPre=-/usr/bin/plymouth quit +ExecStartPre=-/usr/bin/chvt 1 +ExecStart=/sbin/halt.local +TimeoutSec=0 +StandardOutput=tty +RemainAfterExit=yes diff --git a/examples/gui/files/halt.local b/examples/gui/files/halt.local new file mode 100755 index 0000000..e27ad1d --- /dev/null +++ b/examples/gui/files/halt.local @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); +use MDK::Common; +use detect_devices; +use c; + +my ($device) = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+/live/media\s+iso9660!; +$device or exit; + +# try to put halt/reboot in cache, if not called directly from them +# mount is also needed by end of /etc/init.d/halt +system("$_ --help &>/dev/null") foreach qw(halt mount reboot); + +my $f = detect_devices::tryOpen($device); +# see openCdromTray() from install::any +ioctl($f, c::CDROM_LOCKDOOR(), 0); # unlock door +ioctl($f, c::CDROMEJECT(), 0); + +system("clear"); +print "\n\n\nPlease press (or ) once the medium is removed.\n"; +system("read < /dev/console"); + +ioctl($f, c::CDROMCLOSETRAY(), 0); diff --git a/examples/gui/files/mgaonlinerc b/examples/gui/files/mgaonlinerc new file mode 100644 index 0000000..cca41e8 --- /dev/null +++ b/examples/gui/files/mgaonlinerc @@ -0,0 +1 @@ +AUTOSTART=FALSE -- cgit v1.2.1