live-sdk

simple distro kit (livecd edition)
git clone git://parazyd.org/live-sdk.git
Log | Files | Refs | Submodules | README | LICENSE

commit c3537e08d718285827bf74af7a99757552a9afa1
parent 9f251a711c26a93a66bf77938fb67fd6f13cb716
Author: fsmithred <fsmithred@gmail.com>
Date:   Sat, 16 Feb 2019 18:38:34 +0000

update for ascii

Diffstat:
Ablends/devuan-desktop-live/ascii/config | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ablends/devuan-desktop-live/ascii/isolinux-overlay/splash.png | 0
Rblends/devuan-desktop-live/refractasnapshot-gui_10.0.2_all.deb -> blends/devuan-desktop-live/ascii/refractasnapshot-gui_10.0.2_all.deb | 0
Rblends/devuan-desktop-live/rootfs-overlay/.keep -> blends/devuan-desktop-live/ascii/rootfs-overlay/.keep | 0
Rblends/devuan-desktop-live/rootfs-overlay/firmware/00_README.wireless_packages -> blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/00_README.wireless_packages | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-atheros_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-bnx2_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-bnx2x_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-brcm80211_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-intelwimax_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-iwlwifi_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-libertas_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-linux-nonfree_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-myricom_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-netxen_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-qlogic_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-realtek_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-ti-connectivity_20161130-3_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-zd1211_1%3a1.5-4_all.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/grub-efi-ia32_2.02~beta3-5+deb9u1_amd64.deb | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/grub-pc_2.02~beta3-5+deb9u1_amd64.deb | 0
Rblends/devuan-desktop-live/rootfs-overlay/home/devuan/.xscreensaver -> blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/.xscreensaver | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/LARGER_FONTS.desktop | 10++++++++++
Ablends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/SMALLER_FONTS.desktop | 10++++++++++
Ablends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/_RELEASE_NOTES | 159+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rblends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/refractainstaller.desktop -> blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/refractainstaller.desktop | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/splash.png | 0
Ablends/devuan-desktop-live/ascii/rootfs-overlay/usr/local/bin/remove-non-free-firmware | 24++++++++++++++++++++++++
Mblends/devuan-desktop-live/config | 127+++++++++++++++++--------------------------------------------------------------
Ablends/devuan-desktop-live/devuan-desktop-live.blend | 348+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dblends/devuan-desktop-live/devuan-live.blend | 325-------------------------------------------------------------------------------
Dblends/devuan-desktop-live/hooks/fix-lang.sh | 37-------------------------------------
Dblends/devuan-desktop-live/isolinux-overlay/splash.png | 0
Dblends/devuan-desktop-live/refractainstaller-base_9.3.0_all.deb | 0
Dblends/devuan-desktop-live/refractainstaller-gui_9.2.2_all.deb | 0
Dblends/devuan-desktop-live/refractasnapshot-base_10.0.2_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/efibootmgr_0.11.0-3_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/b43-fwcutter_1%3a019-2_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/b43-fwcutter_1%3a019-2_i386.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-atheros_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-b43-installer_1%3a019-2_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-b43legacy-installer_1%3a019-2_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-bnx2_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-bnx2x_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-brcm80211_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-intelwimax_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ipw2x00_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-iwlwifi_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-libertas_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-linux-nonfree_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-myricom_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-netxen_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-qlogic_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ralink_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-realtek_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ti-connectivity_0.43_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/firmware/firmware-zd1211_3.0.0.56-3_all.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/grub-efi-amd64-bin_2.02~beta2-22+deb8u1_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/grub-efi-amd64_2.02~beta2-22+deb8u1_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/grub-pc-bin_2.02~beta2-22+deb8u1_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/grub-pc_2.02~beta2-22+deb8u1_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/LARGER_FONTS.desktop | 10----------
Dblends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/SMALLER_FONTS.desktop | 10----------
Dblends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/_RELEASE_NOTES | 161-------------------------------------------------------------------------------
Dblends/devuan-desktop-live/rootfs-overlay/libefivar0_0.15-3_amd64.deb | 0
Dblends/devuan-desktop-live/rootfs-overlay/usr/bin/refractainstaller-yad | 1818-------------------------------------------------------------------------------
Dblends/devuan-desktop-live/rootfs-overlay/usr/lib/refractainstaller/pre-install/loc-timezn.sh | 41-----------------------------------------
Dblends/devuan-desktop-live/rootfs-overlay/usr/local/bin/adjfontsize | 34----------------------------------
Dblends/devuan-desktop-live/rootfs-overlay/usr/local/bin/remove-non-free-firmware | 9---------
Dblends/devuan-desktop-live/setnet_0.3.2-1_all.deb | 0
Dblends/devuan-desktop-live/yad_0.27.0-1_amd64.deb | 0
Dblends/devuan-desktop-live/yad_0.27.0-1_i386.deb | 0
72 files changed, 687 insertions(+), 2545 deletions(-)

diff --git a/blends/devuan-desktop-live/ascii/config b/blends/devuan-desktop-live/ascii/config @@ -0,0 +1,109 @@ +#!/usr/bin/env zsh +## configuration file for devuan-desktop-live blend -- ASCII release + + +version="2.0.0" + + +base_packages+=( + lsof + bash-completion + texinfo + acpi-support-base + aptitude + apt-listchanges + discover + dnsutils + doc-debian + docutils-common + docutils-doc + ftp + gettext + gnupg2 + gparted + grub-pc-bin + grub-efi-ia32-bin + grub-efi-amd64-bin + $grubversion + iw + laptop-detect + lvm2 + mdadm + mlocate + mutt + ncurses-term + net-tools + netcat-traditional + nfs-common + procmail + reportbug + telnet + traceroute + usbutils + util-linux-locales + w3m + whois +) + + +extra_packages+=( + + task-desktop + task-laptop + task-xfce-desktop + fontsnaps + task-print-server + popularity-contest + refractainstaller-base + refractasnapshot-base + yad + refractainstaller-gui +# refractasnapshot-gui + setnet + +) + + +extra_packages+=( + firmware-atheros + firmware-bnx2 + firmware-bnx2x + firmware-brcm80211 + firmware-intelwimax + firmware-iwlwifi + firmware-libertas + firmware-linux-nonfree + firmware-myricom + firmware-netxen + firmware-qlogic + firmware-realtek + firmware-ti-connectivity + firmware-zd1211 +) + + +purge_packages=( +# btrfs-tools + debian-keyring + elinks + elinks-data + git + git-core + git-man + liberror-perl + libfsplib0 + libtre5 + openntpd + openssh-server + openssh-sftp-server + tmux + zsh + zsh-common +) + + + +custom_deb_packages+=( + + refractasnapshot-gui_10.0.2_all.deb +) diff --git a/blends/devuan-desktop-live/ascii/isolinux-overlay/splash.png b/blends/devuan-desktop-live/ascii/isolinux-overlay/splash.png Binary files differ. diff --git a/blends/devuan-desktop-live/refractasnapshot-gui_10.0.2_all.deb b/blends/devuan-desktop-live/ascii/refractasnapshot-gui_10.0.2_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/.keep b/blends/devuan-desktop-live/ascii/rootfs-overlay/.keep diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/00_README.wireless_packages b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/00_README.wireless_packages diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-atheros_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-atheros_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-bnx2_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-bnx2_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-bnx2x_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-bnx2x_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-brcm80211_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-brcm80211_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-intelwimax_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-intelwimax_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-iwlwifi_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-iwlwifi_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-libertas_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-libertas_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-linux-nonfree_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-linux-nonfree_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-myricom_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-myricom_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-netxen_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-netxen_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-qlogic_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-qlogic_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-realtek_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-realtek_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-ti-connectivity_20161130-3_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-ti-connectivity_20161130-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-zd1211_1%3a1.5-4_all.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/firmware/firmware-zd1211_1%3a1.5-4_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/grub-efi-ia32_2.02~beta3-5+deb9u1_amd64.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/grub-efi-ia32_2.02~beta3-5+deb9u1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/grub-pc_2.02~beta3-5+deb9u1_amd64.deb b/blends/devuan-desktop-live/ascii/rootfs-overlay/grub-pc_2.02~beta3-5+deb9u1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/home/devuan/.xscreensaver b/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/.xscreensaver diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/LARGER_FONTS.desktop b/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/LARGER_FONTS.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=LARGER FONTS +Comment=Increase desktop font size +Exec=/usr/bin/adjfontsize + +Icon=preferences-desktop-accessibility-symbolic +Path= +Terminal=false +StartupNotify=false diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/SMALLER_FONTS.desktop b/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/SMALLER_FONTS.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=SMALLER FONTS +Comment=Decrease desktop font size +Exec=/usr/bin/adjfontsize - +Icon=preferences-desktop-accessibility-symbolic +Path= +Terminal=false +StartupNotify=false diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/_RELEASE_NOTES b/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/_RELEASE_NOTES @@ -0,0 +1,159 @@ +DEVUAN ASCII DESKTOP-LIVE + + +This is Devuan 2.0 ASCII desktop-live edition. It contains the same package +selection as the default desktop in the regular installer isos, with the +addition of a few packages for the live system, wireless firmware, a +live-cd installer and remastering tool to make your own live-CD/DVD image. + +You can burn the iso to DVD or use dd or cat to image a USB thumb drive. + +User name: devuan Password: devuan +Admin name: root Password: toor + + +maintained by fsmithred (key id 0xA73823D3094C5620 on pgp.mit.edu) +built with the Devuan SDK, live-sdk module + + +Contents + 1. Set language/locale at boot. + 2. Wireless (non-free) firmware + 3. Install to hard drive + 4. Remastering + 5. Bug reports and support links. + + + +BOOT TO ANOTHER LANGUAGE + +Choose the "Other language" option from the boot menu. +Press TAB to edit the boot command. +Backspace to erase "it_IT.UTF-8" (Ignore the repeating lines. Bug +or misconfigured?) +Type your locale code in its place and then ENTER. +Note: When you install the system, your chosen language will be the +default in the installed system. + + + + +WIRELESS (NON-FREE) FIRMWARE + +To set up wireless networking, use wicd network manager or run setnet.sh +from a root terminal (or with sudo). + +Wireless firmware is already installed. Most of the firmware packages +come from the non-free repository, however the non-free and contrib +repositories are not enabled. If you want to install packages from +non-free or contrib, you need to edit /etc/apt/sources.list or add them +through Synaptic Package Manager in the System menu. + +You can remove all the non-free firmware after you reboot into the new +installation by running (as root or with sudo): + + remove-non-free-firmware + +If you need to reinstall a firmware package, they are located in /firmware +and can be installed with: + + dpkg -i <package-name> + + +Here is the full list of non-free wireless firmware packages installed: + +firmware-atheros firmware-bnx2 firmware-bnx2x firmware-brcm80211 firmware-intelwimax firmware-iwlwifi firmware-libertas firmware-linux-nonfree firmware-myricom firmware-netxen firmware-qlogic firmware-realtek firmware-ti-connectivity firmware-zd1211 + + + +INSTALLER + +This Devuan live-iso comes with Refracta Installer, which will copy the +running system to hard drive and install the GRUB bootloader. Any changes +you make to the running system will be copied to the installation. This +includes desktop configuration, software added or removed, language/locale +settings and other changes in system configuration. + +The installer will allow you to create a separate /home partition and/or +a separate /boot partition if needed. + +There is no automatic partitioning. You can create the partitions before +you start the installer or from within the installer. Gparted, cfdisk and +gdisk are all installed and available. For a legacy bios install, the +minimum needed is a single partition for the system. For a uefi install, +you must also have an EFI partition. Refer to the installer help +document. (See /usr/lib/refractainstaller/readme.refractainstaller.txt +or press Help from within the installer.) + +IMPORTANT NOTE: grub-efi-amd64 is installed. If you boot from bios, the +installer will find the grub-pc package and ask if you want it copied +and installed or if you would like to proceed without a bootloader. + +If your hardware needs a 32-bit uefi bootloader with a 64-bit operating +system, install the grub-efi-ia32 package before running the installer. +This is true for both graphical and cli installers. + dpkg -i /grub-efi-ia32 + +Note: UEFI implementations in motherboards vary in their adherence to +standards from one manufacturer to the next. Read the Help in the +installer, read the additional links in the help, and be prepared to do +some manual fixing of your bootloader. + +That said, you should not be surprised if it all works perfectly. + +HP WARNING!!! If your computer was made by Hewlett-Packard and uses UEFI, +read these before installing! + + https://dev1galaxy.org/viewtopic.php?id=15 + http://www.rodsbooks.com/efi-bootloaders/index.html + + +You can also start the installer from a root terminal (or with sudo): + refractainstaller # Starts the text-only installer. + refractainstaller-yad # Starts the graphical installer. + + + +You can encrypt the filesystem if desired. (root filesystem and /home). +The installer will use an existing swap partition. If there is no swap +partition or if you un-check that option, the installer will create a +swapfile in the root of the filesystem. The default size is 256MB, but +this can be changed by editing the config file. (/etc/refractainstaller.conf) +This installer will not let you encrypt a swap partition; use a swapfile +on an encrypted partition instead. + +If you want automatic partitioning, LVM or RAID, you must use one of the regular installer isos. +If you want to install on uefi hardware with an installer that has had more extensive testing, +use one of the regular installer isos. + + + +REMASTERING (Make your own live-CD/DVD/USB) + +Run Refracta Snapshot from the applications menu or refractasnapshot-gui +in a root terminal for the graphical version. +Run refractasnapshot from a root terminal for the text-only version. + +The program will copy your installed system and pack it into a bootable +iso that can be burned to optical disk or imaged to a usb stick. +See /usr/share/doc/refractasnapshot-base/README.gz for details. + + + +BUG REPORTS AND SUPPORT LINKS + +Comments, suggestions, criticisms, and bug reports are welcome. +Please report bugs on the official Devuan Bug Tracking System: + + http://bugs.devuan.org + +Full list of community links can be found at: +https://devuan.org/os/community + +Support: +IRC Channel on freenode.net: #devuan +Support forum: dev1galaxy.org + + + + diff --git a/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/refractainstaller.desktop b/blends/devuan-desktop-live/ascii/rootfs-overlay/home/devuan/Desktop/refractainstaller.desktop diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/splash.png b/blends/devuan-desktop-live/ascii/rootfs-overlay/splash.png Binary files differ. diff --git a/blends/devuan-desktop-live/ascii/rootfs-overlay/usr/local/bin/remove-non-free-firmware b/blends/devuan-desktop-live/ascii/rootfs-overlay/usr/local/bin/remove-non-free-firmware @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# remove_non-free_firmware + + +apt-get --purge --yes remove \ + firmware-amd-graphics \ + firmware-atheros \ + firmware-bnx2 \ + firmware-bnx2x \ + firmware-brcm80211 \ + firmware-intelwimax \ + firmware-iwlwifi \ + firmware-libertas \ + firmware-linux-nonfree \ + firmware-myricom \ + firmware-netxen \ + firmware-qlogic \ + firmware-realtek \ + firmware-ti-connectivity \ + firmware-zd1211 + +apt-get autoremove + +exit 0 diff --git a/blends/devuan-desktop-live/config b/blends/devuan-desktop-live/config @@ -1,119 +1,46 @@ #!/usr/bin/env zsh -## configuration file for devuan-live blend +## configuration file for devuan-desktop-live blend vars+=(username userpass default_shell mkefi grubversion hookscripts) arrs+=(custom_deb_packages) -blend_name="devuan-live_" +blend_name="devuan-desktop-live_" + +release="ascii" + username="devuan" userpass="devuan" default_shell="/bin/bash" # comment to disable: -hookscripts="yes" +#hookscripts="yes" # uncomment to create uefi-bootable iso mkefi="yes" -efi_work="$BLENDPATH/efi-files" +efi_work="$BLENDPATH/${release}/efi-files" #grubversion="grub-pc" grubversion="grub-efi-amd64" + +mirror="http://pkgmaster.devuan.org/merged" section="main contrib non-free" -image_name="${os}_${release}_${version}_${arch}_uefi_desktop" - -base_packages+=( - lsof - bash-completion - texinfo - acpi-support-base - aptitude - apt-listchanges - discover - dnsutils - doc-debian - docutils-common - docutils-doc - ftp - gettext - gnupg2 - gparted - $grubversion - iw - laptop-detect - mlocate - mutt - ncurses-term - nfs-common - procmail - reportbug - telnet - usbutils - w3m - whois -) - -extra_packages+=( - - task-desktop - task-english - task-xfce-desktop - task-print-server - popularity-contest -) - - -extra_packages+=( - b43-fwcutter - firmware-atheros - firmware-b43-installer - firmware-b43legacy-installer - firmware-bnx2 - firmware-bnx2x - firmware-brcm80211 - firmware-intelwimax - firmware-iwlwifi - firmware-libertas - firmware-linux-nonfree - firmware-myricom - firmware-netxen - firmware-qlogic - firmware-ralink - firmware-realtek - firmware-ti-connectivity - firmware-zd1211 -) - - -purge_packages=( - btrfs-tools - debian-keyring - elinks - elinks-data - git - git-core - git-man - liberror-perl - libfsplib0 - libtre5 - openntpd - openssh-server - openssh-sftp-server - tmux - zsh - zsh-common -) - - -# yad needs to be first -custom_deb_packages+=(yad_0.27.0-1_${arch}.deb) - - -custom_deb_packages+=( - refractainstaller-base_9.3.0_all.deb - refractainstaller-gui_9.2.2_all.deb - refractasnapshot-base_10.0.2_all.deb - refractasnapshot-gui_10.0.2_all.deb - setnet_0.3.2-1_all.deb -) + + +#base_packages_option=(--no-install-recommends) +#extra_packages_option=(--no-install-recommends) + + +release_conf="$BLENDPATH/${release}/config" + + +### package sets are defined in the corresponding $release/config file + +source $release_conf + +## image_name depends on release and version + +image_name="${os}_${release}_${version}_${arch}_desktop" + + diff --git a/blends/devuan-desktop-live/devuan-desktop-live.blend b/blends/devuan-desktop-live/devuan-desktop-live.blend @@ -0,0 +1,348 @@ +#!/usr/bin/env zsh +# Copyright (c) 2017 Dyne.org Foundation +# live-sdk is written and maintained by Ivan J. <parazyd@dyne.org> +# +# This file is part of live-sdk +# devuan-desktop-live.blend is maintained by fsmithred +# +# This source code 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 3 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this source code. If not, see <http://www.gnu.org/licenses/>. + +BLENDPATH="${BLENDPATH:-$(dirname $0)}" + +source $BLENDPATH/config + +blend_release_path=$BLENDPATH/$release/ +blend_scripts=${blend_release_path}/scripts + +blend_preinst() { + fn blend_preinst + req=(blend_name username userpass) + ckreq || return 1 + + notice "executing $blend_name preinst" + + add-user $username $userpass + + notice "copying blend-specific debs" + cp -fv "$blend_release_path"/*.deb "$R/extra/custom-packages" +} + +blend_postinst() { + fn blend_postinst + req=(strapdir blend_name) + ckreq || return 1 + + notice "executing $blend_name postinst" + + [[ $mkefi = yes ]] && { + iso_make_efi + iso_write_grub_cfg + } + + install-custdebs || zerr + pushd "$strapdir" + sudo rsync -avx --no-o --no-g "$blend_release_path"/rootfs-overlay/* . || zerr + popd + + blend_finalize || zerr +} + +iso_write_isolinux_cfg() { + fn iso_write_isolinux_cfg "(override)" + req=(workdir arch username) + ckreq || return 1 + + notice "writing isolinux configuration" + + cat <<EOF | sudo tee ${workdir}/binary/isolinux/isolinux.cfg >/dev/null +ui vesamenu.c32 +prompt 0 +menu title devuan-live boot menu +timeout 70 +menu background /isolinux/splash.png +menu color title * #FFFFFFFF * +menu color border * #00000000 #00000000 none +menu color sel * #ffffff #44424E * +menu color hotsel 1;7;37;40 #dad9dc #44424E * +menu color tabmsg * #dad9dc #00000000 * +menu color cmdline 0 #dad9dc #00000000 +menu tabmsg Press ENTER to boot or TAB to edit a menu entry +menu vshift 12 +menu rows 12 + +label live + menu label ${os}-live (${arch}) + menu default + linux /live/vmlinuz + append initrd=/live/initrd.img boot=live username=${username} + +label lang + menu label Other language (TAB to edit) + linux /live/vmlinuz + append initrd=/live/initrd.img boot=live username=${username} locales=it_IT.UTF-8 keyboard-layouts=it + +label toram + menu label ${os}-live (${arch}) (load to RAM) + linux /live/vmlinuz + append initrd=/live/initrd.img boot=live username=${username} toram + +label failsafe + menu label ${os}-live (${arch}) (failsafe) + kernel /live/vmlinuz noapic noapm nodma nomce nolapic nosmp nomodeset vga=normal + append initrd=/live/initrd.img boot=live + +label memtest + menu label Memory test + kernel /live/memtest + +endtext +EOF + + notice "copying isolinux overlay" + sudo mkdir -p "$workdir"/binary/{live,isolinux} + sudo cp -rav "$blend_release_path"/isolinux-overlay/* "$workdir"/binary/isolinux/ +# [[ -n "$hookscripts" ]] && { +# sudo cp -av "$blend_release_path"/hooks "$workdir"/binary/live/ +# } +} + +# create /boot and /efi for uefi. +# uefi code borrowed and adapted from David Hare, who borrowed and adapted it +# from similar scripts by Colin Watson and Patrick J. Volkerding. +iso_make_efi() { + fn iso_make_efi + req=(workdir efi_work) + ckreq || return 1 + + notice "creating efi boot files" + + tempdir="$(mktemp -d /tmp/work_temp.XXXX)" + # for initial grub.cfg + mkdir -p "$tempdir"/boot/grub + + if [ "$arch" = amd64 ] ; then + grubarch="x86_64-efi" + elif [ "$arch" = i386 ] ; then + grubarch="i386-efi" + fi + + cat >"$tempdir"/boot/grub/grub.cfg <<EOF +search --file --set=root /isolinux/isolinux.cfg +set prefix=(\$root)/boot/grub +source \$prefix/${grubarch}/grub.cfg +EOF + + mkdir -p "$efi_work" + pushd "$efi_work" + + # start with empty directories. + rm -rf boot; mkdir -p boot/grub/${grubarch} + rm -rf efi ; mkdir -p efi/boot + + # second grub.cfg file + for i in $(find $strapdir/usr/lib/grub/${grubarch} -name 'part_*.mod'); do + print "insmod $(basename $i)" >> boot/grub/${grubarch}/grub.cfg + done + + # Additional modules so we don't boot in blind mode. + # I don't know which ones are really needed. + efimods=( + efi_gop + efi_uga + ieee1275_fb + vbe + vga + video_bochs + video_cirrus + jpeg + png + gfxterm + ) + for i in $efimods; do + print "insmod $i" >> boot/grub/${grubarch}/grub.cfg + done + + print "source /boot/grub/grub.cfg" >> boot/grub/${grubarch}/grub.cfg + + pushd "$tempdir" + # make a tarred "memdisk" to embed in the grub image + tar -cvf memdisk boot + + # make the grub images + grub-mkimage -O "x86_64-efi" -m "memdisk" -o "bootx64.efi" \ + -p '(memdisk)/boot/grub' \ + search iso9660 configfile normal memdisk tar cat \ + part_msdos part_gpt fat ext2 ntfs ntfscomp hfsplus \ + chain boot linux + grub-mkimage -O "i386-efi" -m "memdisk" -o "bootia32.efi" \ + -p '(memdisk)/boot/grub' \ + search iso9660 configfile normal memdisk tar cat \ + part_msdos part_gpt fat ext2 ntfs ntfscomp hfsplus \ + chain boot linux + popd + + # copy the grub image to efi/boot (to go later in the device's root) + cp "$tempdir"/bootx64.efi efi/boot + cp "$tempdir"/bootia32.efi efi/boot + + # Do the boot image "boot/grub/efiboot.img" + dd if=/dev/zero of=boot/grub/efiboot.img bs=1K count=1440 + mkfs.vfat -F 12 boot/grub/efiboot.img + + sudo mkdir img-mnt + sudo mount -o loop boot/grub/efiboot.img img-mnt + sudo mkdir -p img-mnt/efi/boot + sudo cp "$tempdir"/bootx64.efi img-mnt/efi/boot/ + sudo cp "$tempdir"/bootia32.efi img-mnt/efi/boot/ + + # copy modules and font + cp $strapdir/usr/lib/grub/${grubarch}/* boot/grub/${grubarch}/ + + # if this doesn't work try another font from the same place (grub's default, unicode.pf2, is much larger) + # Either of these will work, and they look the same to me. Unicode seems to work with qemu. -fsr + # cp /usr/share/grub/ascii.pf2 boot/grub/font.pf2 + cp $strapdir/usr/share/grub/unicode.pf2 boot/grub/font.pf2 + + # copy splash + sudo cp -rav "$blend_release_path"/isolinux-overlay/splash.png boot/grub/splash.png + + # Cleanup efi temps + sudo umount img-mnt + sudo rmdir img-mnt + rm -rf "$tempdir" + + popd + + + # Copy efi files to iso + pushd $workdir + sudo rsync -avx "$efi_work"/boot binary/ + sudo rsync -avx "$efi_work"/efi binary/ + popd + +} + + +iso_write_grub_cfg() { + fn iso_write_grub_cfg "(override)" + req=(workdir arch username) + ckreq || return 1 + + notice "writing grub configuration" + + # Do the main grub.cfg (which gets loaded last): + cat <<EOF | sudo tee ${workdir}/binary/boot/grub/grub.cfg +if loadfont $prefix/font.pf2 ; then + set gfxmode=640x480 + insmod efi_gop + insmod efi_uga + insmod video_bochs + insmod video_cirrus + insmod gfxterm + insmod jpeg + insmod png + terminal_output gfxterm +fi + +background_image /boot/grub/splash.png +set menu_color_normal=white/black +set menu_color_highlight=dark-gray/white +set timeout=6 + +menuentry "${os}-live (${arch})" { + set gfxpayload=keep + linux /live/vmlinuz boot=live username=$username + initrd /live/initrd.img +} + +menuentry "Other language" { + set gfxpayload=keep + linux /live/vmlinuz boot=live username=$username locales=it_IT.UTF-8 keyboard-layouts=it + initrd /live/initrd.img +} + +menuentry "${os}-live (load to RAM)" { + set gfxpayload=keep + linux /live/vmlinuz boot=live username=$username toram + initrd /live/initrd.img +} + +menuentry "${os}-live (failsafe)" { + set gfxpayload=keep + linux /live/vmlinuz boot=live username=$username noapic noapm nodma nomce nolapic nosmp vga=normal + initrd /live/initrd.img +} + +menuentry "Memory test" { + linux /live/memtest +} + +EOF +} + +blend_finalize() { + fn blend_finalize + req=(strapdir username default_shell) + ckreq || return 1 + + cat <<EOF | sudo tee ${strapdir}/finalize >/dev/null +#!/bin/sh + +## permissions +for i in cdrom floppy audio dip video plugdev netdev lpadmin scanner; do + gpasswd -a ${username} \$i +done + +chsh -s "${default_shell}" ${username} +chown -R 1000:1000 /home/${username} +#cp /home/${username}/Desktop/refractainstaller.desktop /usr/share/applications/ +chmod +x /home/${username}/Desktop/refractainstaller.desktop + +# This can go away when desktop-base is fixed to do the grub theme. (SEEMS TO BE FIXED-no it's not.) +grep -q GRUB_THEME /etc/default/grub || { + printf "\nGRUB_THEME=/usr/share/desktop-base/grub-themes/desktop-grub-theme/theme.txt\n" >> /etc/default/grub +} + +# This needs to stay +cp /splash.png /usr/lib/refractasnapshot/iso/isolinux/ +rm -f /splash.png + +# This has been fixed (in devuan-baseconf) in suites/ascii +#rm -rf /data + +rm -f /etc/fstab +rm -f /etc/popularity-contest.conf + +# For ascii if no display manager is used. Maybe this should have a +# contitional that's turned on/off in the config? +# echo "needs_root_rights=yes" >> /etc/X11/Xwrapper.config + +# Disable contrib and non-free after installing firmware. +sed -i 's/contrib//g' /etc/apt/sources.list +sed -i 's/non-free//g' /etc/apt/sources.list + +## package list - Why does this make an empty file? +#dpkg -l | awk '/^ii/ { print $2 " " $3 }' > /home/${username}/package_list +#printf "\nGo to files.devuan.org\n" >> /home/${username}/package_list + +# Enable encryption (e.g. for live-usb with persistence) +#sed -i 's/#CRYPTSETUP=/CRYPTSETUP=y/' /etc/cryptsetup-initramfs/conf-hook +CRYPTSETUP=y update-initramfs -u -k all + +apt-get update +apt-get clean +updatedb +EOF + chroot-script -d finalize || zerr +} diff --git a/blends/devuan-desktop-live/devuan-live.blend b/blends/devuan-desktop-live/devuan-live.blend @@ -1,325 +0,0 @@ -#!/usr/bin/env zsh -# Copyright (c) 2017 Dyne.org Foundation -# live-sdk is written and maintained by Ivan J. <parazyd@dyne.org> -# -# This file is part of live-sdk -# devuan-live.blend is maintained by fsmithred -# -# This source code 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 3 of the License, or -# (at your option) any later version. -# -# This software is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this source code. If not, see <http://www.gnu.org/licenses/>. - -BLENDPATH="${BLENDPATH:-$(dirname $0)}" - -source $BLENDPATH/config - -blend_preinst() { - fn blend_preinst - req=(blend_name username userpass) - ckreq || return 1 - - notice "executing $blend_name preinst" - - add-user $username $userpass - - notice "copying blend-specific debs" - cp -fv "$BLENDPATH"/*.deb "$R/extra/custom-packages" -} - -blend_postinst() { - fn blend_postinst - req=(strapdir blend_name) - ckreq || return 1 - - notice "executing $blend_name postinst" - - [[ $mkefi = yes ]] && { - iso_make_efi - iso_write_grub_cfg - } - - install-custdebs || zerr - pushd "$strapdir" - sudo rsync -avx --no-o --no-g "$BLENDPATH"/rootfs-overlay/* . || zerr - popd - - blend_finalize || zerr -} - -iso_write_isolinux_cfg() { - fn iso_write_isolinux_cfg "(override)" - req=(workdir arch username) - ckreq || return 1 - - notice "writing isolinux configuration" - - cat <<EOF | sudo tee ${workdir}/binary/isolinux/isolinux.cfg >/dev/null -ui vesamenu.c32 -prompt 0 -menu title devuan-live boot menu -timeout 70 -menu background /isolinux/splash.png -menu color title * #FFFFFFFF * -menu color border * #00000000 #00000000 none -menu color sel * #ffffffff #A1B067 * -menu color hotsel 1;7;37;40 #ffffffff #A1B067 * -menu color tabmsg * #E5FD91 #00000000 * -menu color cmdline 0 #E5FD91 #00000000 -menu tabmsg Press ENTER to boot or TAB to edit a menu entry -menu vshift 12 -menu rows 12 - -label live - menu label ${os}-live (${arch}) - menu default - linux /live/vmlinuz - append initrd=/live/initrd.img boot=live username=${username} - -label lang - menu label Other language (TAB to edit) - linux /live/vmlinuz - append initrd=/live/initrd.img boot=live username=${username} hooks=file:///lib/live/mount/medium/live/hooks/fix-lang.sh locales=it_IT.UTF-8 - -label toram - menu label ${os}-live (${arch}) (load to RAM) - linux /live/vmlinuz - append initrd=/live/initrd.img boot=live username=${username} toram - -label failsafe - menu label ${os}-live (${arch}) (failsafe) - kernel /live/vmlinuz noapic noapm nodma nomce nolapic nosmp nomodeset vga=normal - append initrd=/live/initrd.img boot=live - -label memtest - menu label Memory test - kernel /live/memtest - -endtext -EOF - - notice "copying isolinux overlay" - sudo mkdir -p "$workdir"/binary/{live,isolinux} - sudo cp -rav "$BLENDPATH"/isolinux-overlay/* "$workdir"/binary/isolinux/ - [[ -n "$hookscripts" ]] && { - sudo cp -av "$BLENDPATH"/hooks "$workdir"/binary/live/ - } -} - -# create /boot and /efi for uefi. -# uefi code borrowed and adapted from David Hare, who borrowed and adapted it -# from similar scripts by Colin Watson and Patrick J. Volkerding. -iso_make_efi() { - fn iso_make_efi - req=(workdir efi_work) - ckreq || return 1 - - notice "creating efi boot files" - - tempdir="$(mktemp -d /tmp/work_temp.XXXX)" - # for initial grub.cfg - mkdir -p "$tempdir"/boot/grub - - - cat >"$tempdir"/boot/grub/grub.cfg <<EOF -search --file --set=root /isolinux/isolinux.cfg -set prefix=(\$root)/boot/grub -source \$prefix/x86_64-efi/grub.cfg -EOF - - mkdir -p "$efi_work" - pushd "$efi_work" - - # start with empty directories. - rm -rf boot; mkdir -p boot/grub/x86_64-efi - rm -rf efi ; mkdir -p efi/boot - - # second grub.cfg file - for i in $(find $strapdir/usr/lib/grub/x86_64-efi -name 'part_*.mod'); do - print "insmod $(basename $i)" >> boot/grub/x86_64-efi/grub.cfg - done - - # Additional modules so we don't boot in blind mode. - # I don't know which ones are really needed. - efimods=( - efi_gop - efi_uga - ieee1275_fb - vbe - vga - video_bochs - video_cirrus - jpeg - png - gfxterm - ) - for i in $efimods; do - print "insmod $i" >> boot/grub/x86_64-efi/grub.cfg - done - - print "source /boot/grub/grub.cfg" >> boot/grub/x86_64-efi/grub.cfg - - pushd "$tempdir" - # make a tarred "memdisk" to embed in the grub image - tar -cvf memdisk boot - - # make the grub image - grub-mkimage -O "x86_64-efi" -m "memdisk" -o "bootx64.efi" \ - -p '(memdisk)/boot/grub' \ - search iso9660 configfile normal memdisk tar cat \ - part_msdos part_gpt fat ext2 ntfs ntfscomp hfsplus \ - chain boot linux - popd - - # copy the grub image to efi/boot (to go later in the device's root) - cp "$tempdir"/bootx64.efi efi/boot - - # Do the boot image "boot/grub/efiboot.img" - dd if=/dev/zero of=boot/grub/efiboot.img bs=1K count=1440 - mkfs.vfat -F 12 boot/grub/efiboot.img - - sudo mkdir img-mnt - sudo mount -o loop boot/grub/efiboot.img img-mnt - sudo mkdir -p img-mnt/efi/boot - sudo cp "$tempdir"/bootx64.efi img-mnt/efi/boot/ - - # copy modules and font - cp $strapdir/usr/lib/grub/x86_64-efi/* boot/grub/x86_64-efi/ - - # if this doesn't work try another font from the same place (grub's default, unicode.pf2, is much larger) - # Either of these will work, and they look the same to me. Unicode seems to work with qemu. -fsr - # cp /usr/share/grub/ascii.pf2 boot/grub/font.pf2 - cp $strapdir/usr/share/grub/unicode.pf2 boot/grub/font.pf2 - - # copy splash - sudo cp -rav "$BLENDPATH"/isolinux-overlay/splash.png boot/grub/splash.png - - # Cleanup efi temps - sudo umount img-mnt - sudo rmdir img-mnt - rm -rf "$tempdir" - - popd - - - # Copy efi files to iso - pushd $workdir - sudo rsync -avx "$efi_work"/boot binary/ - sudo rsync -avx "$efi_work"/efi binary/ - popd - -} - - -iso_write_grub_cfg() { - fn iso_write_grub_cfg "(override)" - req=(workdir arch username) - ckreq || return 1 - - notice "writing grub configuration" - - # Do the main grub.cfg (which gets loaded last): - cat <<EOF | sudo tee ${workdir}/binary/boot/grub/grub.cfg -if loadfont $prefix/font.pf2 ; then - set gfxmode=640x480 - insmod efi_gop - insmod efi_uga - insmod video_bochs - insmod video_cirrus - insmod gfxterm - insmod jpeg - insmod png - terminal_output gfxterm -fi - -background_image /boot/grub/splash.png -set menu_color_normal=white/black -set menu_color_highlight=dark-gray/white -set timeout=6 - -menuentry "${os}-live (${arch})" { - set gfxpayload=keep - linux /live/vmlinuz boot=live username=$username - initrd /live/initrd.img -} - -menuentry "Other language" { - set gfxpayload=keep - linux /live/vmlinuz boot=live username=$username hooks=file:///lib/live/mount/medium/live/hooks/fix-lang.sh locales=it_IT.UTF-8 - initrd /live/initrd.img -} - -menuentry "${os}-live (load to RAM)" { - set gfxpayload=keep - linux /live/vmlinuz boot=live username=$username toram - initrd /live/initrd.img -} - -menuentry "${os}-live (failsafe)" { - set gfxpayload=keep - linux /live/vmlinuz boot=live username=$username noapic noapm nodma nomce nolapic nosmp vga=normal - initrd /live/initrd.img -} - -menuentry "Memory test" { - linux /live/memtest -} - -EOF -} - -blend_finalize() { - fn blend_finalize - req=(strapdir username default_shell) - ckreq || return 1 - - cat <<EOF | sudo tee ${strapdir}/finalize >/dev/null -#!/bin/sh - -## permissions -for i in cdrom floppy audio dip video plugdev netdev lpadmin scanner; do - gpasswd -a ${username} \$i -done - -chsh -s "${default_shell}" ${username} -chown -R 1000:1000 /home/${username} -cp /home/${username}/Desktop/refractainstaller.desktop /usr/share/applications/ -chmod +x /home/${username}/Desktop/refractainstaller.desktop - -# This can go away when desktop-base is fixed to do the grub theme. -grep -q GRUB_THEME /etc/default/grub || { - printf "\nGRUB_THEME=/usr/share/desktop-base/grub-themes/desktop-grub-theme/theme.txt\n" >> /etc/default/grub -} - -# Not sure if this has been fixed (in devuan-baseconf?) -mv /data/etc/apt/apt.conf.d/05disable-suggests /etc/apt/apt.conf.d/ -rm -rf /data - -rm -f /etc/fstab -rm -f /etc/popularity-contest.conf - -# For ascii if no display manager is used. Maybe this should have a -# contitional that's turned on/off in the config? -# echo "needs_root_rights=yes" >> /etc/X11/Xwrapper.config - -# Disable contrib and non-free after installing firmware. -sed -i 's/contrib//g' /etc/apt/sources.list -sed -i 's/non-free//g' /etc/apt/sources.list - -## package list -dpkg -l | awk '/^ii/ { print $2 " " $3 }' > /home/${username}/package_list - -apt-get update -apt-get clean -updatedb -EOF - chroot-script -d finalize || zerr -} diff --git a/blends/devuan-desktop-live/hooks/fix-lang.sh b/blends/devuan-desktop-live/hooks/fix-lang.sh @@ -1,37 +0,0 @@ -#!/bin/sh - -# Custom hook script, modified from: -# -## live-config(7) - System Configuration Components -## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch> -## -## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - -set -x - - - # Reading kernel command line - for _PARAMETER in ${LIVE_CONFIG_CMDLINE} - do - case "${_PARAMETER}" in -# live-config.username=*|username=*) -# LIVE_USERNAME="${_PARAMETER#*username=}" -# ;; - locales=*) - LIVE_LANG="${_PARAMETER#*locales=}" - ;; - - esac - done - - -if [ -n "$LIVE_LANG" ] ; then - echo "LIVE_LANG is $LIVE_LANG @@@@@" - - cat > /etc/profile.d/tt_locale.sh <<EOF -export LANG=${LIVE_LANG} -export LC_ALL=${LIVE_LANG} -EOF -fi diff --git a/blends/devuan-desktop-live/isolinux-overlay/splash.png b/blends/devuan-desktop-live/isolinux-overlay/splash.png Binary files differ. diff --git a/blends/devuan-desktop-live/refractainstaller-base_9.3.0_all.deb b/blends/devuan-desktop-live/refractainstaller-base_9.3.0_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/refractainstaller-gui_9.2.2_all.deb b/blends/devuan-desktop-live/refractainstaller-gui_9.2.2_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/refractasnapshot-base_10.0.2_all.deb b/blends/devuan-desktop-live/refractasnapshot-base_10.0.2_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/efibootmgr_0.11.0-3_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/efibootmgr_0.11.0-3_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/b43-fwcutter_1%3a019-2_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/b43-fwcutter_1%3a019-2_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/b43-fwcutter_1%3a019-2_i386.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/b43-fwcutter_1%3a019-2_i386.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-atheros_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-atheros_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-b43-installer_1%3a019-2_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-b43-installer_1%3a019-2_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-b43legacy-installer_1%3a019-2_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-b43legacy-installer_1%3a019-2_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-bnx2_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-bnx2_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-bnx2x_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-bnx2x_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-brcm80211_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-brcm80211_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-intelwimax_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-intelwimax_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ipw2x00_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ipw2x00_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-iwlwifi_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-iwlwifi_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-libertas_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-libertas_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-linux-nonfree_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-linux-nonfree_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-myricom_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-myricom_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-netxen_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-netxen_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-qlogic_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-qlogic_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ralink_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ralink_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-realtek_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-realtek_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ti-connectivity_0.43_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-ti-connectivity_0.43_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-zd1211_3.0.0.56-3_all.deb b/blends/devuan-desktop-live/rootfs-overlay/firmware/firmware-zd1211_3.0.0.56-3_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/grub-efi-amd64-bin_2.02~beta2-22+deb8u1_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/grub-efi-amd64-bin_2.02~beta2-22+deb8u1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/grub-efi-amd64_2.02~beta2-22+deb8u1_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/grub-efi-amd64_2.02~beta2-22+deb8u1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/grub-pc-bin_2.02~beta2-22+deb8u1_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/grub-pc-bin_2.02~beta2-22+deb8u1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/grub-pc_2.02~beta2-22+deb8u1_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/grub-pc_2.02~beta2-22+deb8u1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/LARGER_FONTS.desktop b/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/LARGER_FONTS.desktop @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=LARGER FONTS -Comment=Increase desktop font size -Exec=/usr/local/bin/adjfontsize + -Icon=preferences-desktop-accessibility-symbolic -Path= -Terminal=false -StartupNotify=false diff --git a/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/SMALLER_FONTS.desktop b/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/SMALLER_FONTS.desktop @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=SMALLER FONTS -Comment=Decrease desktop font size -Exec=/usr/local/bin/adjfontsize - -Icon=preferences-desktop-accessibility-symbolic -Path= -Terminal=false -StartupNotify=false diff --git a/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/_RELEASE_NOTES b/blends/devuan-desktop-live/rootfs-overlay/home/devuan/Desktop/_RELEASE_NOTES @@ -1,161 +0,0 @@ -DEVUAN-LIVE DESKTOP - - -This is Devuan-Live jessie desktop edition. It contains the same package -selection as the default desktop in the regular installer isos, with the -addition of a few packages for the live system, wireless firmware, a -live-cd installer and remastering tool to make your own live-CD/DVD image. - -You can burn the iso to DVD or use dd to image a USB thumb drive. - -User name: devuan Password: devuan -Admin name: root Password: toor - - -maintained by fsmithred (key id 0xD95DDF2BF71AAAEB on pgp.mit.edu) -built with the Devuan SDK, live-sdk module - - -Contents - 1. Set language/locale at boot. - 2. Wireless (non-free) firmware - 3. Install to hard drive - 4. Remastering - 5. Bug reports and support links. - - - -BOOT TO ANOTHER LANGUAGE - -Choose the "Other language" option from the boot menu. -Press TAB to edit the boot command. -Backspace to erase "it_IT.UTF-8" (Ignore the repeating lines. Bug -or misconfigured?) -Type your locale code in its place and then ENTER. -Note: When you install the system, your chosen language will be the -default in the installed system. - - - - -WIRELESS (NON-FREE) FIRMWARE - -To set up wireless networking, use wicd network manager or run setnet.sh -from a root terminal (or with sudo). - -Wireless firmware is already installed. Most of the firmware packages -come from the non-free repository, however the non-free and contrib -repositories are not enabled. If you want to install packages from -non-free or contrib, you need to edit /etc/apt/sources.list or add them -through Synaptic Package Manager in the System menu. - -You can remove all the non-free firmware after you reboot into the new -installation by running (as root or with sudo): - remove-non-free-firmware - -If you need to reinstall a firmware package, they are located in /firmware -and can be installed with: - - dpkg -i <package-name> - - -Here is the full list of non-free packages installed: - -b43-fwcutter firmware-atheros firmware-b43-installer firmware-b43legacy-installer firmware-bnx2 firmware-bnx2x firmware-brcm80211 firmware-intelwimax firmware-iwlwifi firmware-libertas firmware-linux-nonfree firmware-myricom firmware-netxen firmware-qlogic firmware-ralink firmware-realtek firmware-ti-connectivity firmware-zd1211 - - -NOTE: firmware-ipw2x00 requires an end-user agreement and is therefore not installed. -The deb package can be found in /firmware with the rest of the non-free firmware packages. - - - - -INSTALLER - -This Devuan live-iso comes with Refracta Installer, which will copy the -running system to hard drive and install the GRUB bootloader. Any changes -you make to the running system will be copied to the installation. This -includes desktop configuration, software added or removed, language/locale -settings and other changes in system configuration. - -The installer will allow you to create a separate /home partition and/or -a separate /boot partition if needed. - -There is no automatic partitioning. You can create the partitions before -you start the installer or from within the installer. Gparted, cfdisk and -cgdisk are all installed and available. For a legacy bios install, the -minimum needed is a single partition for the system. For a uefi install, -you must also have an EFI partition. Refer to the uefi installer help -document. (See /usr/lib/refractainstaller/uefi_install.readme or -press Help from within the uefi installer.) - -Note that the uefi installer is still considered experimental. UEFI -implementations in motherboards vary in their adherence to standards -from one manufacturer to the next. Read the Help in the installer, read -the additional links in the help, and be prepared to do some manual fixing -of your bootloader. - -That said, you should not be surprised if it all works perfectly. - -HP WARNING!!! If your computer was made by Hewlett-Packard and uses UEFI, -read these before installing! - - https://dev1galaxy.org/viewtopic.php?id=15 - http://www.rodsbooks.com/efi-bootloaders/index.html - -When you select the installer from the menu or the desktop icon, it will -detect if you booted on uefi or bios hardware, and it will start the -correct installer script. The bios installer has a choice of Simple or -Expert Install. Expert is the recommended choice. If you make no changes -in the options window, it's almost identical to the Simple Install. - -You can also start the installer from a root terminal (or with sudo): - refractainstaller # Starts the text-only installer. (no uefi support) - refractainstaller-yad # Starts the installer for legacy bios systems. - refractainstaller-uefi # Starts the installer for uefi systems. - - - -You can encrypt the filesystem if desired. (root filesystem and /home). -The installer will use an existing swap partition. If there is no swap -partition or if you un-check that option, the installer will create a -swapfile in the root of the filesystem. The default size is 256MB, but -this can be changed by editing the config file. (/etc/refractainstaller.conf) -This installer will not let you encrypt a swap partition; use a swapfile -on an encrypted partition instead. - -If you want automatic partitioning, LVM or RAID, you must use one of the regular installer isos. -If you want to install on uefi hardware with an installer that has had more extensive testing, -use one of the regular installer isos. - - - -REMASTERING (Make your own live-CD/DVD/USB) - -Run Refracta Snapshot from the applications menu or refractasnapshot-gui -in a root terminal for the graphical version. -Run refractasnapshot from a root terminal for the text-only version. - -The program will copy your installed system and pack it into a bootable -iso that can be burned to optical disk or imaged to a usb stick. -See /usr/share/doc/refractasnapshot-base/README.gz for details. - - - -BUG REPORTS AND SUPPORT LINKS - -Comments, suggestions, criticisms, and bug reports are welcome. -Please report bugs on the official Devuan Bug Tracking System: - - http://bugs.devuan.org - -Full list of community links can be found at: -https://devuan.org/os/community - -Support: -IRC Channel on freenode.net: #devuan -Support forum: dev1galaxy.org - - - - diff --git a/blends/devuan-desktop-live/rootfs-overlay/libefivar0_0.15-3_amd64.deb b/blends/devuan-desktop-live/rootfs-overlay/libefivar0_0.15-3_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/rootfs-overlay/usr/bin/refractainstaller-yad b/blends/devuan-desktop-live/rootfs-overlay/usr/bin/refractainstaller-yad @@ -1,1818 +0,0 @@ -#!/usr/bin/env bash - -version="Refracta Installer (Yad) 9.2.1 (20170521)" - -TEXTDOMAIN=refractainstaller-gui -TEXTDOMAINDIR=/usr/share/locale/ - -# Copyright 2011-2017 fsmithred@gmail.com -# Portions may be copyright Dean Linkous and/or David Hare and/or others. -# Based on refractainstaller-8.0.3 by Dean Linkous -# License: GPL-3 -# This is free software with NO WARRANTY. Use at your own risk! - - -# DESCRIPTION -# This script is used for installing a live system to a hard drive. User -# input is via popup windows created by yad. It should be run from -# a terminal; if it's started from a menu item or a panel launcher, it -# should be run in a persistent terminal, so that progress messages can -# be seen and for user input in a few places. -# -# There are two modes for installation - Simple or Expert -# Simple Mode: -# Create rsync excludes file if default file is missing. -# User can run partitioner inside the installer or skip it. -# User selects partition for installation. Bootloader goes to /dev/sda. -# Summary window asks to proceed with installation. -# Stuff happens without interaction. -# -# Expert Mode: -# User selects installation options - change username, select up to three -# partitions (/, /boot, /home), select filesystem type for each partition, -# choose whether to encrypt partitions or not, choose whether to write -# random data or zeros to partitions. -# User has option to exit and use custom excludes file. -# User can run partitioner inside the installer. -# Summary window asks to proceed with installation. -# Stuff happens with some interaction (passwords, username, edit /etc/sudoers) -# -# Stuff: -# Cleanup (in case of previous aborted run) -# Create encrypted volumes *(Expert mode only) -# Write random data or zeros * -# Mount partition(s) and create filesystem(s) -# Copy system with rsync -# Create swapfile or use existing swap partition -# Copy update-initramfs -# Set up fstab -# Set up crypttab * -# Install bootloader -# Cleanup -# Change username and passwords, edit /etc/sudoers * - - -# If you want to change any defaults, change them in the configfile. -# Default is /etc/refractainstaller.conf -# If you want to use a different config file for testing, change this -# variable. Normally, users should not edit anything in this script. - - - -configfile="/etc/refractainstaller.conf" - -if [[ -f $configfile ]]; then - source $configfile -else - yad --title=$"Warning" --window-icon=error \ - --button=$"Exit":0 --center \ - --text=$" Config file $configfile is missing. - " - echo $" Config file $configfile is missing." - exit 1 -fi - - -# greeter window title -if [ -z "$window_title" ]; then -window_title="$version" -fi - -show_help () { - printf "$help_text" - exit 0 -} - -help_text=$" - Usage: $0 [option] - - Run refractainstaller-yad from a terminal with no options - or select Refracta Installer from the System menu to install - a running live-CD or live-usb-hdd to a hard drive. - - - valid options: - -h, --help show this help text - -v, --version display the version information - -d. --debug debug mode - -" - -while [[ $1 == -* ]]; do - case "$1" in - - -h|--help) - show_help ;; - - -v|--version) - printf "\n$version\n\n" - exit 0 ;; - - -d|--debug) - DEBUG="yes" - break ;; - - *) - printf $"\t invalid option: $1 \n\n" - printf $"\t Try: $0 -h for full help. \n\n" - exit 1 ;; - esac -done - -if [ "$debug" = "yes" ] || [ "$DEBUG" = "yes" ]; then - set -x -fi - -# Check that xserver is running and user is root. -[[ $DISPLAY ]] || { echo $"There is no xserver running. Exiting..." ; exit 1 ; } -if [[ $(id -u) -ne 0 ]] ; then - yad --title=$"Error" --window-icon=error --center --text=$" - You need to be root! -" - exit 1 -fi - -# wrapper script starts installer in xterm. -clear -echo $"DO NOT close this terminal window until the installation is finished." - -# Record errors in a logfile. -exec 2>"$error_log" - -#****************************************************************** - -# Make sure yad is installed, and check the version. -if [[ -f /usr/bin/yad ]] ; then - yadversion=$(yad --version | cut -d. -f2) - if [[ $yadversion < 17 ]]; then - yad --title=$"Error" --window-icon=error --center --text=$" - The version of Yad is too old. You need 0.17.1.1 or later. -" - echo $" - The version of Yad is too old. You need 0.17.1.1 or later. If Zenity - is installed, you can run refractainstaller-gui instead. -" - exit 1 - fi -else - echo $"Yad is not installed. To use the cli version instead, run -'refractainstaller' from a root terminal. -Exiting..." - exit 1 -fi - - -### TEMPORARY WARNING ### Remove this when uefi is merged into this installer. -# -# Abort if the system has booted with UEFI. This installer won't do it. -if [[ -d /sys/firmware/efi ]]; then - yad --warning --title=$"Warning" --image=gtk-dialog-warning \ - --button=$"OK":0 --text=$" -Warning. It appears you have booted on a system that uses UEFI. -This version of refractainstaller doesn't know how to do that. - -If you have a good understanding of UEFI, you can try the -experimental uefi installer: /usr/bin/refractainstaller-uefi. - -Read the uefi_install.readme first! -See: /usr/lib/refractainstaller/uefi_install.readme -" - exit 0 -fi - -#****************************************************************** - -if [[ ! -d /lib/live/mount/medium ]] && [[ ! -d /lib/live/mount/findiso ]] && [[ ! -d /lib/live/mount/fromiso ]] && [[ ! -d /lib/live/mount/persistence ]]; then - live_session_warning=$" ### WARNING: Not running from live-CD or live-USB ### - ### or unsupported configuration. Be sure you know ### - ### what you are doing. This may not work. ### " -fi - - -# Greeting window -yad --title="$window_title" --width=480 \ - --button=$"Continue":0 --button=$"Exit":1 --center \ - --text=$"$live_session_warning - - This utility will install a running live-CD or live-USB to your hard drive. - - This is free software that comes with no warranty or guarantee of any - type, including but not limited to express, implied, merchantability or - fitness of purpose. - - Copyright 2011-2017 fsmithred@gmail.com, - based on refractainstaller-8.0.3 by Dean Linkous. \n Version: $version \n\n\ - ${custom_text} \n -" -mode="$?" - case $mode in - 0) install="expert" ;; - 1) exit 0 ;; - esac - - -# determine grub version now, it gets used for installing the bootloader and -# preventing simple install from using ext4 with grub-legacy or grub-gfx. - grubversion=$(dpkg -l | egrep "ii|hi" | grep -v bin | grep -v doc | awk '$2 ~ "grub-[glp]" { print $2}') -# grubversion="grub-legacy" # for testing, comment out the above line and uncomment this one - - -# function to exit the script if there are errors -check_exit () { -exit_code="$?" -if [[ $exit_code -ne 0 ]] ; then - yad --question --title=$"Error" --window-icon=error --center --button=$"Continue":0 --button=$"Exit now":1 \ - --text=$"Error detected: $exit_code $error_message -\nSee $error_log for details. \n\nThis may not be fatal.. Press \"Continue\" to proceed anyway" - - if [[ $? -ne 0 ]] ; then - cleanup - exit 1 - fi -fi -} - - -copy_excludes () { - cat > "$rsync_excludes" <<EOF -# It is safe to delete this file after installation. - -- /dev/* -- /cdrom/* -- /media/* -- /target -- /swapfile -- /mnt/* -- /sys/* -- /proc/* -- /tmp/* -- /live -- /boot/grub/grub.cfg -- /boot/grub/menu.lst -- /boot/grub/device.map -- /etc/udev/rules.d/70-persistent-cd.rules -- /etc/udev/rules.d/70-persistent-net.rules -- /etc/fstab -- /etc/fstab.d -- /etc/mtab -- /home/snapshot/ -- /home/*/.gvfs - -# Added for newer version of live-config/live-boot -# in sid (to become Jessie) -- /lib/live/overlay -- /lib/live/image -- /lib/live/rootfs -- /lib/live/mount -- /run/* - -EOF - - chmod 666 "$rsync_excludes" -} - - - -# Check that rsync excludes file exists, or create one. -if ! [[ -f $rsync_excludes ]] ; then - yad --title=$"Warning" --window-icon=error --center \ - --button=$"Continue":0 --button=$"Exit":1 \ - --text=$" There is no rsync excludes file, or its name does not match what this script expects. - You should continue and let the script create one, or if you have a custom excludes file, - and you know what you're doing, you can exit the script and edit the - rsync_excludes variable in $configfile so that it matches the name - and path of your custom file. - - If you have any other drives or partitions mounted that you don't want - to be copied, unmount them or edit the excludes file to list them." - if [[ $? = 0 ]] ; then - rsync_excludes="$(pwd)/installer_exclude.list" - copy_excludes - echo $"@@@ copied excludes to $(pwd)" >> "$error_log" - else - exit 0 - fi -fi - - -# These set the default setting in the options window, -# based on setting in config file. Simple Install does -# what config file says. -if [[ $run_preinstall = "yes" ]] ; then - var15="TRUE" -else - var15="FALSE" -fi -if [[ $run_postinstall = "yes" ]] ; then - var16="TRUE" -else - var16="FALSE" -fi - -pre_install_list=$(ls -m /usr/lib/refractainstaller/pre-install) -post_install_list=$(ls -m /usr/lib/refractainstaller/post-install) - -# Check for swap partition and set default option accordingly. -if [[ $(blkid -c /dev/null | grep swap) ]] ; then - var3="TRUE" -else - var3="FALSE" -fi - - -# Select expert installation options -if [[ $install = "expert" ]]; then - opts=$(yad --list --title=$"Installation Options" --center \ - --text=$"Check the options you want for the installation.\n -If you don't understand an option, you probably don't need it.\n" \ - --checklist --column $"Choose" --column "":HD --column $"Option" \ - --width=590 --height=555 --button=$"OK":0 --button=$"Exit":1\ - FALSE 01 $"Create a separate /home partition" \ - FALSE 02 $"Create a separate /boot partition" \ - $var3 03 $"Use existing swap partition instead of swapfile." \ - FALSE 04 $"Encrypt the root filesystem (separate /boot required)" \ - FALSE 05 $"Encrypt the /home partition (separate /home required)" \ - FALSE 06 $"Write random data to encrypted partitions (more secure)" \ - FALSE 07 $"Write zeroes to all partitions (to erase previous data)" \ - FALSE 08 $"Do not install bootloader. I'll handle it myself." \ - FALSE 09 $"Do not format filesystems. I'll handle it myself." \ - TRUE 10 $"Use UUID in /etc/fstab. (Useful if drive order changes.)" \ - FALSE 11 $"Use filesystem labels (disk labels) in /etc/fstab." \ - TRUE 12 $"Disable automatic login to desktop." \ - TRUE 13 $"Disable automatic login to console. (sysvinit only)" \ - FALSE 14 $"Move selected directories to separate partitions." \ - $var15 15 $"Run pre-install scripts (listed below) -$pre_install_list" \ - $var16 16 $"Run post-install scripts (listed below) -$post_install_list") - - -else -# simple defaults -use_uuid="yes" -disable_auto_desktop="yes" -disable_auto_console="yes" - -fi - if [[ $? = 1 ]] ; then - exit 0 - fi - -if $(echo $opts | grep -q 01); then - sep_home="yes" -fi -if $(echo $opts | grep -q 02); then - sep_boot="yes" -fi -if $(echo $opts | grep -q 03); then - use_existing_swap="yes" -fi -if $(echo $opts | grep -q 04); then - encrypt_os="yes" -fi -if $(echo $opts | grep -q 05); then - encrypt_home="yes" -fi -if $(echo $opts | grep -q 06); then - write_random="yes" -fi -if $(echo $opts | grep -q 07); then - write_zero="yes" -fi -if $(echo $opts | grep -q 08); then - bootloader="no" -else - bootloader="yes" -fi -if $(echo $opts | grep -q 09); then - if [[ $encrypt_os = "yes" ]] || [[ $encrypt_home = "yes" ]]; then - no_format="" - else - no_format="yes" - fi -fi -if $(echo $opts | grep -q 10) || [ "$use_uuid" = "yes" ]; then - if [[ $encrypt_os = "yes" ]] || [[ $encrypt_home = "yes" ]]; then - uuid_message=$"--> UUIDs in fstab won't work with encrypted filesystems and - will not be used. Edit fstab manually after the installation." - - else - use_uuid="yes" - fi -fi -if $(echo $opts |grep -q 11) || [ "$use_labels" = "yes" ]; then - if [[ $encrypt_os = "yes" ]] || [[ $encrypt_home = "yes" ]]; then - disklabel_message=$"--> Disk labels in fstab won't work with encrypted filesystems and - will not be used. Edit fstab manually after the installation." - else - use_uuid="no" - use_labels="yes" - fi -fi - -if $(echo $opts | grep -q 12); then - disable_auto_desktop="yes" -fi -if $(echo $opts | grep -q 13); then - disable_auto_console="yes" -fi -if $(echo $opts | grep -q 14); then - if ! [[ -h /usr/lib/refractainstaller/post-install/move-dir-mount-gui.sh ]] ; then - ln -s /usr/lib/refractainstaller/move-dir-mount-gui.sh /usr/lib/refractainstaller/post-install/move-dir-mount-gui.sh - fi - separate_partition_message=$"At the end of the installation, you will be given a chance to move selected directories to separate partitions." -else - if [[ -h /usr/lib/refractainstaller/post-install/move-dir-mount-gui.sh ]] ; then - rm /usr/lib/refractainstaller/post-install/move-dir-mount-gui.sh - fi -fi -if $(echo $opts | grep -q 15); then - run_preinstall="yes" -elif [[ $install = "simple" ]]; then - run_preinstall="yes" -else - run_preinstall="no" -fi -if $(echo $opts | grep -q 16); then - run_postinstall="yes" -elif [[ $install = "simple" ]]; then - run_postinstall="yes" -else - run_postinstall="no" -fi - - -if [[ $encrypt_os = "yes" ]] || [[ $encrypt_home = "yes" ]]; then - # test for cryptsetup - if ! [[ -f /sbin/cryptsetup ]] ; then - yad --title=$"Error" --window-icon=error --center \ - --button=$"Proceed without encrypting partitions":0 \ - --button=$"Exit":1 --text=$"You need to install cryptsetup and run the command, 'sudo modprobe dm-mod' before you can use encryption." - if [[ $? = 0 ]] ; then - encrypt_os="no" - encrypt_home="no" - else - exit 1 - fi - fi - # end test for cryptsetup -fi - - -## Partition a disk ##### Simple install now does get to partition the disk - uncomment the conditional below to change it back. -#if [[ $install = "expert" ]]; then -yad --title=$"Partitioning" --button=$"Run GParted":0 --button=$"Run cfdisk":1 \ - --width=650 --button=$"Skip this step":2 --button=$"Exit":3 --center \ - --text=$" You need to have at least one partition ready for the installation, plus one for each separate - partition that you chose. If you already have the partition(s) ready, you can skip this step. - - Run the partitioner now?" - - ans="$?" - case $ans in - 0) gparted ;; - 1) xterm -T "Close this terminal after partioning" -fa mono -fs 12 -geometry 90x25+0+0 -hold -e cfdisk ;; - 2) ;; - 3) exit 0 ;; - esac -#fi - -# # test to make sure there's a separate /boot partition -if [[ $sep_boot = "no" ]]; then - if [[ $encrypt_os = "yes" ]]; then - yad --window-icon=error --title=$"Error" --center \ - --button=$"Proceed without encrypting partition":0 \ - --button=$"Exit":1 --text=$"You MUST have a separate, unencrypted /boot partition if you intend to boot an encrypted operating system. You can proceed without encrypting the root filesystem, or you can exit and start over." - if [[ $? = 0 ]] ; then - encrypt_os="no" - else - exit 1 - fi - fi -fi - - -# Find hard drives, and choose one for grub -choose_grub () { -yad --title=$"Install GRUB bootloader" --center --text=$" Choose a location to install the GRUB bootloader. The usual choice is to - put it in the master boot record of the first hard drive (/dev/sda). - - Choose MBR to install to the mbr of any hard disk. - Choose Partition to install to a partition. - Choose No Bootloader to proceed without a bootloader. - Choose Exit to exit this program. - " \ ---button=$"MBR":0 --button=$"Partition":1 --button=$"No Bootloader":2 --button=$"Exit":3 -answer="$?" - -if [[ $answer = 0 ]] ; then -grub_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[sh]d[a-z]$|*nvme[0-9]n[0-9]$|*mmcblk[0-9]$" \ - | sort | awk '{print "\n" $0 }' \ - | yad --list --separator="" --title=$"Bootloader" --center --text=$"Choose a location to install the bootloader. -" \ - --column ' ' --column 'Hard Drives' --height=200) - - if [[ -z $grub_dev ]] ; then - yad --title=$"Error" --window-icon=error --center --button=$"Yes, I'm sure.":0 --button=$"Go back":1 \ - --text=$"No bootloader will be installed. Are you sure you want this?" - if [[ $? = 1 ]] ; then - choose_grub - fi - elif ! [[ -b $grub_dev ]] ; then - yad --title=$"Error" --window-icon=error --center --button=$"Exit":0 --button=$"Go back":1 \ - --text=$"Something is wrong. $grub_dev is not a block device." - if [[ $? = 0 ]] ; then - exit 1 - else - choose_grub - fi - fi - -elif [[ $answer = 1 ]] ; then -grub_partition=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[sh]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \ - | sort | awk '{print "\n" $0 }' \ - | yad --list --title=$"Bootloader" --center --text=$"Select a partition for the bootloader (GRUB)." \ - --separator="" --column ' ' --column $'Partitions' --height=380 --width=150) - - if [[ -z $grub_partition ]] ; then - yad --title=$"Error" --window-icon=error --center --button=$"Yes, I'm sure.":0 --button=$"Go back":1 \ - --text=$"No bootloader will be installed. Are you sure you want this?" - if [[ $? = 1 ]] ; then - choose_grub - fi - elif ! [[ -b $grub_partition ]] ; then - yad --title=$"Error" --window-icon=error --center --button=$"Exit":0 --button=$"Go back":1 \ - --text=$"Something is wrong. $grub_partition is not a block device." - if [[ $? = 0 ]] ; then - exit 1 - else - choose_grub - fi - fi - - -elif [[ $answer = 2 ]] ; then - yad --title=$"Bootloader" ---center -text=$" Proceeding without a bootloader. - You will need to do special things to boot your operating system. Be sure - that you know what you're doing." \ - --button=$"Proceed":0 --button=$"Exit":1 - if [[ $? = 1 ]] ; then - exit 0 - fi -elif [[ $answer = 3 ]] ; then - exit 0 -fi -} - -### Simple install gets default grub bootloader in /dev/sda -if [[ $install = "expert" ]]; then - if [[ $bootloader = "yes" ]]; then - choose_grub - fi -fi - -if [[ $install = "simple" ]]; then - grub_dev="/dev/sda" -fi - - -# Show output of blkid for reference. -#xterm -fa mono -fs 12 -geometry 90x20+0+0 -hold -e 'echo "Partition list (for reference.) You may need this later." && blkid -c /dev/null' & -blkid -c /dev/null | yad --text-info --title=$"Partition List" --text=$"Partition list (for reference.) You may need this later." \ ---width 820 --height 400 --button=$"Close window":0 & -sleep 2 - -# Show the partition list in a menu, and choose one for /boot -choose_boot () { -boot_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[sh]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \ - | sort | awk '{print "\n" $0 }' \ - | yad --list --title=$"/boot partition" --center --text=$"Select a partition for /boot." \ - --separator="" --column ' ' --column $'Partitions' --height=380 --width=150 --button=$"OK":0) -} - -if [[ $sep_boot = "yes" ]]; then - choose_boot -fi - -# Choose filesystem type for /boot -choose_fs_boot () { -if [[ -n $boot_dev ]]; then - fs_type_boot=$(yad --list --title=$"/boot filesystem" --center --text=$"What type of filesystem would you like on $boot_dev?" \ - --separator="" --column $"Format" --height=200 --button=$"OK":0 \ - "ext4" \ - "ext3" \ - "ext2") -fi - -if [[ -z $fs_type_boot ]]; then - yad --window-icon=error --title=$"Error" --center --button=$"Go back":0 --button=$"Exit":1 \ - --text=$"You must choose a file system type for /boot" - if [[ $? = 0 ]]; then - choose_fs_boot - else - exit 1 - fi -fi -} - -if [[ -n $boot_dev ]]; then - if [[ $no_format = "yes" ]]; then - fs_type_boot=$(blkid -s TYPE "$boot_dev" | awk -F"\"" '{ print $2 }') - else - choose_fs_boot - fi -fi - - -# Show the partition list in a menu, and choose one for the OS -choose_root () { -install_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[sh]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \ - | sort | awk '{print "\n" $0 }' \ - | yad --list --title=$"Root Partition" --center --text=$"Choose a partition to use for the installation of the operating system." \ - --separator="" --column ' ' --column $'Partitions' --height 380 --width 150 --button=$"OK":0) - -if [[ -z $install_dev ]] ; then - yad --window-icon=error --title=$"Error" --center --button=$"Go back":0 --button=$"Exit":1 \ - --text=$"Nothing was selected. You must select a partition for the installation. What would you like to do?" - if [[ $? = 0 ]] ; then - choose_root - else - exit 1 - fi -elif ! [[ -b $install_dev ]] ; then - yad --window-icon=error --title=$"Error" --center --button=$"Go back":0 --button=$"Exit":1 \ - --text=$" Something is wrong. Maybe you checked - more than one box. You said you want to install - the system to $install_dev" - if [[ $? = 0 ]] ; then - choose_root - else - exit 1 - fi -elif - [[ $install_dev = $boot_dev ]] ; then - yad --window-icon=error --title=$"Error" --center --text=$"You chose the same partition for the operating system as the one for /boot. Try again." --button=$"OK":0 - choose_root -fi -} - -choose_root - - -# Choose filesystem type for OS. -choose_fs_os () { -fs_type_os=$(yad --list --title=$"Root Filesystem" --center --text=$"What type of filesystem would you like on $install_dev?" \ - --separator="" --column $"Format" --height=200 --button=$"OK":0 \ - "ext4" \ - "ext3" \ - "ext2") -if [[ -z $fs_type_os ]]; then - yad --window-icon=error --title=$"Error" --center --button=$"Go back":0 --button=$"Exit":1 \ - --text=$"You must choose a file system type -for the operating system" - if [[ $? = 0 ]]; then - choose_fs_os - else - exit 1 - fi -fi -} - - -### Simple install gets default ext4 filesystem (or ext3 with older grub) -if [[ $install = "expert" ]]; then - if [[ $no_format = "yes" ]]; then - fs_type_os=$(blkid -s TYPE "$install_dev" | awk -F"\"" '{ print $2 }') - else - choose_fs_os - fi -else - if [[ $grubversion = "grub-pc" ]] ; then - fs_type_os="ext4" - else - fs_type_os="ext3" - fi -fi - - - -# Show the partition list in a menu, and choose one for /home -choose_home () { -home_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[sh]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \ - | sort | awk '{print "\n" $0 }' \ - | yad --list --title=$"/home partition" --center --text=$"Select a partition for /home" \ - --separator="" --column ' ' --column $'Partitions' --height=380 --width=150 --button=$"OK":0) -if [[ -n $home_dev ]] ; then - if ! [[ -b $home_dev ]] ; then - yad --info --title="Error" --center --button=$"Go back":0 --button=$"Exit":1 \ - --text=$" Something is wrong. - $home_dev is not a block device. " - if [[ $? = 0 ]] ; then - choose_home - else - exit 1 - fi - elif - [[ $install_dev = $home_dev ]] ; then - yad --window-icon=error --title=$"Error" --center --text=$"You chose the same partition for /home as the one for the operating system. If you don't want a separate /home partition, then click OK without selecting one." \ - --button=$"Go back":0 --button=$"Exit":1 - if [[ $? = 0 ]] ; then - choose_home - else - exit 1 - fi - elif - [[ $boot_dev = $home_dev ]] ; then - yad --window-icon=error --title=$"Error" --center --text=$"You chose the same partition for /home as the one for /boot. Try again." \ - --button=$"Go back":0 --button=$"Exit":1 - if [[ $? = 0 ]] ; then - choose_home - else - exit 1 - fi - fi -fi -} - -if [[ $sep_home = "yes" ]]; then - choose_home -fi - - -# Choose filesystem type for /home -choose_fs_home () { -if [[ -n $home_dev ]]; then - fs_type_home=$(yad --list --title=$"/home filesystem" --center --text=$"What type of filesystem would you like on $home_dev?" \ - --separator="" --column $"Format" --height=200 --button=$"OK":0 \ - "ext4" \ - "ext3" \ - "ext2") -fi - -if [[ -z $fs_type_home ]]; then - yad --window-icon=error --title=$"Error" --center --button=$"Go back":0 --button=$"Exit":1 \ - --text=$"You must choose a file system type for /home" - if [[ $? = 0 ]]; then - choose_fs_home - else - exit 1 - fi -fi -} - -if [[ -n $home_dev ]]; then - if [[ $no_format = "yes" ]]; then - fs_type_home=$(blkid -s TYPE "$home_dev" | awk -F"\"" '{ print $2 }') - else - choose_fs_home - fi -fi - - -# Show available swap partitions and choose one. -choose_swap () { -swap_info=$(/sbin/blkid |grep swap | awk '{print "\n" $0 }'\ -| yad --list --title=$"swap partition" --center --text=$"Select a partition for swap." \ - --separator="" --column ' ' --column $'Partitions' --height=180 --width=600 --button=$"OK":0) -swap_dev=$(echo $swap_info | awk -F: '{ print $1 }') -if [[ -z $swap_dev ]] ; then - yad --window-icon=error --title=$"Error" --center --text=$"You did not choose a swap partition. -Click OK to use a swapfile instead. -Click Cancel to exit the program." - if [[ $? = 0 ]] ; then - use_existing_swap="" - else - exit 1 - fi -fi -} - - -if [[ $use_existing_swap = "yes" ]]; then - choose_swap -fi - - - - - -# Show a summary of what will be done -# if [[ $change_user = "yes" ]]; then -# user_message=$"--> User name will be changed." -# fi - -if [[ -n $grub_dev ]] ; then - grub_dev_message=$"--> Bootloader will be installed in $grub_dev" -elif [[ -n $grub_partition ]] ; then - grub_dev_message=$"--> Bootloader will be installed in $grub_partition" -else - grub_dev_message=$"--> Bootloader will not be installed." -fi - -if [[ $encrypt_os = yes ]] ; then - os_enc_message=$", and will be encrypted." -fi - -if [[ -z $home_dev ]] ; then - home_dev_message=$"--> /home will not be on a separate partition." -elif - [[ $no_format = "yes" ]]; then - home_dev_message=$"--> /home will be installed on $home_dev" -else - home_dev_message=$"--> /home will be installed on $home_dev and formatted as $fs_type_home" -fi - -if [[ -n $home_dev ]] && [[ $encrypt_home = yes ]] ; then - home_enc_message=$", and will be encrypted." -fi - -if [[ -n $boot_dev ]] ; then - if [[ $no_format != "yes" ]]; then - boot_dev_message=$"--> /boot will be installed on $boot_dev and formatted as $fs_type_boot." - else - boot_dev_message=$"--> /boot will be installed on $boot_dev" - fi -fi - -if [[ $encrypt_os = yes ]] || [[ $encrypt_home = yes ]] ; then - proceed_message=$"*** IF YOU PROCEED, YOU WILL NEED TO RESPOND TO SOME QUESTIONS IN THE TERMINAL. Be prepared to create - passphrases for any encrypted partitions (several times each.) When you see the progress bar come up, you can take a break." -fi - -if [[ $disable_auto_desktop = "yes" ]]; then - desktop_message=$"Desktop autologin will be disabled." -fi - -if [[ $disable_auto_console = "yes" ]]; then - console_message=$"Console autologin will be disabled." -fi - -if [[ $no_format = "yes" ]]; then - install_dev_message=$"--> Operating system will be installed on $install_dev, and you will (or did) format it manually." -else - install_dev_message=$"--> Operating system will be installed on $install_dev and formatted as $fs_type_os$os_enc_message" -fi - -if [[ $run_preinstall = "yes" ]] ; then - preinstall_message=$"pre-install scripts are enabled." -else - preinstall_message=$"pre-install scripts are disabled." -fi -if [[ $run_postinstall = "yes" ]] ; then - postinstall_message=$"post-install scripts are enabled." -else - postinstall_message=$"post-install scripts are disabled." -fi - - -yad --info --title=$"Summary" --center --button=$"Proceed with the installation.":0 --button=$"Exit":1 \ - --text=$"Please CLOSE any running applications NOW. - -Here is a summary of what will be done. THIS IS YOUR LAST CHANCE TO EXIT before any changes are made to the disk. - -$grub_dev_message -$install_dev_message$os_enc_message -$home_dev_message$home_enc_message -$boot_dev_message -$desktop_message -$console_message -$uuid_message -$disklabel_message -$preinstall_message -$postinstall_message -$separate_partition_message - -$proceed_message" - if [[ $? != 0 ]] ; then - exit 0 - fi - - -# Actual installation begins here - - -# Run pre-install scripts if enabled. -if [[ $run_preinstall = "yes" ]] ; then - for file in /usr/lib/refractainstaller/pre-install/* ; do - if [[ -x $file ]] ; then - bash $file - fi - done -fi - - -# Unmount or close anything that might need unmounting or closing -cleanup () { -echo -e $"\n @@@ Cleaning up...\n" >> "$error_log" -if $(df | grep -q /target/proc/) ; then - umount /target/proc/ -fi - -if $(df | grep -q /target/dev/) ; then - umount /target/dev/ -fi - -if $(df | grep -q /target/sys/) ; then - umount /target/sys/ -fi - -# grep gives an error if $boot_dev is null -if $(df | grep -q $boot_dev) ; then - umount -l $boot_dev -fi - -if $(df | grep -q /target_boot) ; then - umount -l /target_boot/ -fi - -if $(df | grep -q /target_home) ; then - umount -l /target_home/ -fi - -# grep gives an error if $home is null -if $(df | grep -q $home_dev) ; then - umount $home_dev -fi - -if $(df | grep -q "\/dev\/mapper\/home_fs") ; then - umount /dev/mapper/home_fs -fi - -if [[ -h /dev/mapper/home_fs ]] ; then - cryptsetup luksClose home_fs -fi - -if $(df | grep -q /target) ; then - umount -l /target/ -fi - -if $(df | grep -q $install_dev) ; then - umount $install_dev -fi - -if $(df | grep "\/dev\/mapper\/root_fs") ; then - umount /dev/mapper/root_fs -fi - -if [[ -h /dev/mapper/root_fs ]] ; then - cryptsetup luksClose /dev/mapper/root_fs -fi - - -# These next ones might be unnecessary -if [[ -d /target ]] ; then - rm -rf /target -fi - -if [[ -d /target_home ]] ; then - rm -rf /target_home -fi - -if [[ -d /target_boot ]] ; then - rm -rf /target_boot -fi -} - -cleanup | tee >(yad --progress --pulsate --width=350 --auto-close --title=$"Cleanup") - - -# Write random data to OS partition -if [[ $write_random = "yes" ]]; then - if [[ $encrypt_os = "yes" ]]; then - #xterm -fa mono -fs 12 -geometry 80x20+0+0 -e dd if=/dev/urandom of="$install_dev" -# # Redirect stderr so we can see the output of dd - exec 2>&1 - dd if=/dev/urandom of="$install_dev" -# # Resume logging errors in file - exec 2>>"$error_log" - fi -fi - -# Write random data to /home partition -if [[ $write_random = "yes" ]]; then - if [[ $encrypt_home = "yes" ]]; then - #xterm -fa mono -fs 12 -geometry 80x20+0+0 -e dd if=/dev/urandom of="$home_dev" -# # Redirect stderr so we can see the output of dd - exec 2>&1 - dd if=/dev/urandom of="$home_dev" -# # Resume logging errors in file - exec 2>>"$error_log" - fi -fi - - -# Write zeros to partitions -if [[ $write_zero = "yes" ]]; then - #xterm -fa mono -fs 12 -geometry 80x20+0+0 -e dd if=/dev/zero of="$install_dev" - dd if=/dev/zero of="$install_dev" - if [[ $sep_home = "yes" ]]; then - #xterm -fa mono -fs 12 -geometry 80x20+0+0 -e dd if=/dev/zero of="$home_dev" -# # Redirect stderr so we can see the output of dd - exec 2>&1 - dd if=/dev/zero of="$home_dev" -# # Resume logging errors in file - exec 2>>"$error_log" - fi - if [[ $sep_boot = "yes" ]]; then - #xterm -fa mono -fs 12 -geometry 80x20+0+0 -e dd if=/dev/zero of="$boot_dev" -# # Redirect stderr so we can see the output of dd - exec 2>&1 - dd if=/dev/zero of="$boot_dev" -# # Resume logging errors in file - exec 2>>"$error_log" - fi -fi - - -# make mount point, format, adjust reserve and mount -# install_dev must maintain the device name for cryptsetup -# install_part will be either device name or /dev/mapper name as needed. -mkdir /target ; check_exit - - -#***************************************************************************** - - -make_luks () { -exec 2>/dev/null - setpass=$(yad --form --field=$"Password:H" --field=$"Retype Password:H" --separator="@_@" \ - --title=$"Passphrase" --center --image="dialog-password" --button=$"OK":0 --text=$"Enter a passphrase for the encrypted volume: $mapper_name ") - - if [[ $(echo $setpass | awk -F"@_@" '{print $1}') != $(echo $setpass | awk -F"@_@" '{print $2}') ]] ; then - try_again - return - else - passphr=$(echo $setpass | awk -F"@_@" '{ print $1 }') - echo "$passphr" | cryptsetup luksFormat "$luks_dev" - echo "$passphr" | cryptsetup luksOpen "$luks_dev" "$mapper_name" - - fi -exec 2>>"$error_log" -} - - -try_again () { -yad --image="gtk-dialog-warning" --title $"Error" --center --button=$"Yes":0 --button=$"Exit":1 \ ---text=$"Entries do not match. Do you want to try again?" -if [[ $? = 0 ]] ; then - make_luks -else - cleanup - exit 0 -fi -} - - -if [[ $encrypt_os = yes ]] ; then - luks_dev="$install_dev" - mapper_name="root_fs" - make_luks - install_part="/dev/mapper/$mapper_name" -else - install_part="$install_dev" -fi -if [[ $no_format != "yes" ]]; then - mke2fs -t $fs_type_os "$install_part" ; check_exit - tune2fs -r 10000 "$install_part" ; check_exit -fi -mount "$install_part" /target ; check_exit - - -# make mount point for separate home if needed -# and set variable for rsync exclusion. -if [[ -n $home_dev ]] ; then - mkdir /target_home ; check_exit - if [[ $encrypt_home = yes ]]; then - luks_dev="$home_dev" - mapper_name="home_fs" - make_luks - home_part="/dev/mapper/$mapper_name" - else - home_part=$home_dev - fi - if [[ $no_format != "yes" ]]; then - mke2fs -t $fs_type_home "$home_part" ; check_exit - tune2fs -r 10000 "$home_part" ; check_exit - fi - mount "$home_part" /target_home ; check_exit - sep_home_opt="--exclude=/home/*" -fi - - - -#***************************************************************************** - - -# make mount point for separate /boot if needed -# and set variable for rsync exclusion. -# allow default for reserved blocks (don't need tune2fs here) -if [[ -n $boot_dev ]] ; then - mkdir /target_boot ; check_exit - if [[ $no_format != "yes" ]]; then - mke2fs -t $fs_type_boot $boot_dev ; check_exit - fi - mount $boot_dev /target_boot - sep_boot_opt="--exclude=/boot/*" -fi - - -# copy everything over except the things listed in the exclude list -rsync -av / /target/ --filter='P lost+found' --filter='H lost+found' --exclude-from="$rsync_excludes" ${sep_home_opt} ${sep_boot_opt} --delete-before --delete-excluded | \ -tee >(yad --progress --pulsate --width=350 --auto-close --title=$"Copying system to new partition.") - - -# copy separate /home if needed -if ! [[ -z $home_dev ]] ; then - rsync -av /home/ /target_home/ --filter='P lost+found' --filter='H lost+found' --exclude-from="$home_boot_excludes" | \ -tee >(yad --progress --pulsate --width=350 --auto-close --title=$"Copying home folders to new partition.") -fi - -# copy separate /boot if needed -if [[ -n $boot_dev ]] ; then - rsync -av /boot/ /target_boot/ --filter='P lost+found' --filter='H lost+found' --exclude-from="$home_boot_excludes" | \ -tee >(yad --progress --pulsate --width=350 --auto-close --title=$"Copying files to boot partition.") -fi - - -# create swapfile -if ! [[ $use_existing_swap = "yes" ]] ; then - dd if=/dev/zero of=/target/swapfile bs="$swapfile_blocksize" count="$swapfile_count" | \ - tee >(yad --progress --pulsate --width=350 --auto-close --center --title=$"Making a swap file...") - mkswap /target/swapfile ; check_exit - chmod 600 /target/swapfile -fi - - - -# copy the real update-initramfs back in place ### OBSOLETE??? -#if [[ -f /target/usr/sbin/update-initramfs.distrib ]] ; then -# cp /target/usr/sbin/update-initramfs.distrib /target/usr/sbin/update-initramfs -#fi -#if [[ -f /target/usr/sbin/update-initramfs.debian ]] ; then -# cp /target/usr/sbin/update-initramfs.debian /target/usr/sbin/update-initramfs -#fi - -#***************************************************************************** - - -# Disallow mounting of all fixed drives with pmount -if [[ -f /target/etc/pmount.allow ]] ; then - if [[ $pmount_fixed = "no" ]] ; then - sed -i 's:/dev/sd\[a-z\]:#/dev/sd\[a-z\]:' /target/etc/pmount.allow - fi -fi - -# Re-enable updatedb if it was disabled by an older version of refractasnapshot -if [[ -e /target/usr/bin/updatedb.mlocate ]] ; then - if ! [[ -x /target/usr/bin/updatedb.mlocate ]] ; then - chmod +x /target/usr/bin/updatedb.mlocate - fi -fi - - -# These two functions replace lines 1146-1211 - -# Disable autologin -set_noautologin_desktop () { - - #gdm - if [[ -f /target/etc/gdm/gdm.conf ]]; then - sed -i 's/^AutomaticLogin/#AutomaticLogin/' /target/etc/gdm/gdm.conf - fi - - #gdm3 - if [[ -f /target/etc/gdm3/daemon.conf ]]; then - sed -i 's/^AutomaticLogin/#AutomaticLogin/' /target/etc/gdm3/daemon.conf - fi - - #lightdm - if [[ -f /target/etc/lightdm/lightdm.conf ]]; then - sed -i 's/^autologin/#autologin/g' /target/etc/lightdm/lightdm.conf - fi - - #kdm - if [ -f /target/etc/default/kdm.d/live-autologin ]; then - rm -f /target/etc/default/kdm.d/live-autologin - fi - - if [ -f /target/etc/kde3/kdm/kdmrc ]; then - sed -i -e 's/^AutoLogin/#AutoLogin/g' /target/etc/kde3/kdm/kdmrc \ - -e 's/^AutoReLogin/#AutoReLogin/g' /target/etc/kde3/kdm/kdmrc - fi - - if [ -f /target/etc/kde4/kdm/kdmrc ]; then - sed -i -e 's/^AutoLogin/#AutoLogin/g' /target/etc/kde4/kdm/kdmrc \ - -e 's/^AutoReLogin/#AutoReLogin/g' /target/etc/kde4/kdm/kdmrc - fi - - # trinity desktop - - # v3.5.13 - if [[ -f /target/etc/default/kdm-trinity.d/live-autologin ]]; then - rm -f /target/etc/default/kdm-trinity.d/live-autologin - fi - - if [ -f /target/etc/trinity/kdm/kdmrc ]; then - sed -i -e 's/^AutoLogin/#AutoLogin/g' /target/etc/trinity/kdm/kdmrc \ - -e 's/^AutoReLogin/#AutoReLogin/g' /target/etc/trinity/kdm/kdmrc - fi - - # v3.5.14 - if [[ -f /target/etc/default/tdm-trinity.d/live-autologin ]]; then - rm -f /target/etc/default/tdm-trinity.d/live-autologin - fi - - if [ -f /target/etc/trinity/tdm/tdmrc ]; then - sed -i -e 's/^AutoLogin/#AutoLogin/g' /target/etc/trinity/tdm/tdmrc \ - -e sed -i -e 's/^AutoReLogin/#AutoReLogin/g' /target/etc/trinity/tdm/tdmrc - - fi - - #slim - if [[ -f /target/etc/slim.conf ]] ; then - sed -i -e 's/^[ ]*default_user/#default_user/' \ - -e 's/^[ ]*auto_login.*$/#auto_login no/' /target/etc/slim.conf - - fi - - # No display manager - if [ -f /target/etc/profile.d/zz-live-config_xinit.sh ]; then - rm -f /target/etc/profile.d/zz-live-config_xinit.sh - fi - -} - - -# Keep autologin and update username in the display manager config. -set_autologin_desktop () { - - #gdm - if [[ -f /target/etc/gdm/gdm.conf ]]; then - sed -i "/AutomaticLogin/s/$oldusername/$newusername/" /target/etc/gdm/gdm.conf - fi - - #gdm3 - if [[ -f /target/etc/gdm3/daemon.conf ]]; then - sed -i "/AutomaticLogin/s/$oldusername/$newusername/" /target/etc/gdm3/daemon.conf - fi - - #lightdm - if [[ -f /target/etc/lightdm/lightdm.conf ]]; then - sed -i "/autologin/s/=$oldusername/=$newusername/" /target/etc/lightdm/lightdm.conf - fi - - #kdm - if [ -f /target/etc/default/kdm.d/live-autologin ]; then - # This one might not be right. - sed -i "s/$oldusername/$newusername/g" /target/etc/default/kdm.d/live-autologin - fi - - if [ -f /target/etc/kde3/kdm/kdmrc ]; then - sed -i -e "/AutoLogin/s/$oldusername/$newusername/" /target/etc/kde3/kdm/kdmrc \ - -e "/AutoReLogin/s/$oldusername/$newusername/" /target/etc/kde3/kdm/kdmrc - fi - - if [ -f /target/etc/kde4/kdm/kdmrc ]; then - sed -i -e "/AutoLogin/s/$oldusername/$newusername/" /target/etc/kde4/kdm/kdmrc \ - -e "/AutoReLogin/s/$oldusername/$newusername/" /target/etc/kde4/kdm/kdmrc - fi - - # trinity desktop - - # v3.5.13 - if [[ -f /target/etc/default/kdm-trinity.d/live-autologin ]]; then - # This one might not be right. - sed -i "s/$oldusername/$newusername/g" /target/etc/default/kdm-trinity.d/live-autologin - fi - - if [ -f /target/etc/trinity/kdm/kdmrc ]; then - sed -i -e "/AutoLogin/s/$oldusername/$newusername/" /target/etc/trinity/kdm/kdmrc \ - -e "/AutoReLogin/s/$oldusername/$newusername/" /target/etc/trinity/kdm/kdmrc - fi - - # v3.5.14 - if [[ -f /target/etc/default/tdm-trinity.d/live-autologin ]]; then - # This one might not be right. - sed -i "s/$oldusername/$newusername/g" /target/etc/default/tdm-trinity.d/live-autologin - fi - - if [ -f /target/etc/trinity/tdm/tdmrc ]; then - sed -i -e "/AutoLogin/s/$oldusername/$newusername/" /target/etc/trinity/tdm/tdmrc \ - -e "/AutoReLogin/s/$oldusername/$newusername/" /target/etc/trinity/tdm/tdmrc - fi - - #slim - if [[ -f /target/etc/slim.conf ]] ; then - sed -i -e "/default_user/s/\s\+$oldusername/ $newusername/" /target/etc/slim.conf - fi - - # No display manager - # (Nothing to do here.) - -} - - -# setup fstab - -# add entry for root filesystem -if [[ $encrypt_os != "yes" ]]; then - if [[ $use_uuid = yes ]]; then - install_part="$(blkid -s UUID $install_dev | awk '{ print $2 }' | sed 's/\"//g')" - elif [[ $use_labels = yes ]]; then - rootfslabel=$(/sbin/blkid -c /dev/null -s LABEL $install_dev | awk -F"\"" '{ print $2 }') - if [[ -n $rootfslabel ]]; then - install_part="LABEL=$rootfslabel" - else - rootfslabel=$(yad --entry --title=$"Filesystem Label" --center --text=$"Enter a disk label for $install_dev" --width=300 --button=$"OK":0) - if [[ -n $rootfslabel ]]; then - e2label "$install_dev" "$rootfslabel" - install_part="LABEL=$rootfslabel" - else - install_part="$install_dev" - fi - fi - else - install_part="$install_dev" - fi -fi -echo -e "$install_part\t/\t$fs_type_os\tdefaults,noatime\t0\t1" > /target/etc/fstab -check_exit - - -# add entry for /home to fstab if needed -if ! [[ -z $home_dev ]] ; then - if [[ $encrypt_os != "yes" ]]; then - if [[ $use_uuid = yes ]]; then - home_part="$(blkid -s UUID $home_dev | awk '{ print $2 }' | sed 's/\"//g')" - elif [[ $use_labels = yes ]]; then - homefslabel=$(/sbin/blkid -c /dev/null -s LABEL $home_dev | awk -F"\"" '{ print $2 }') - if [[ -n $homefslabel ]]; then - home_part="LABEL=$homefslabel" - else - homefslabel=$(yad --entry --title=$"Filesystem Label" --center --text=$"Enter a disk label for $home_dev" --width=300 --button=$"OK":0) - if [[ -n $homefslabel ]]; then - e2label "$home_dev" "$homefslabel" - home_part="LABEL=$homefslabel" - else - home_part="$home_dev" - fi - fi - else - home_part="$home_dev" - fi - fi - echo -e "$home_part\t/home\t$fs_type_home\tdefaults,noatime\t0\t2" >> /target/etc/fstab - check_exit -fi - -# add entry for /boot to fstab if needed -if [[ -n $boot_dev ]] ; then - if [[ $use_uuid = yes ]]; then - boot_part="$(blkid -s UUID $boot_dev | awk '{ print $2 }' | sed 's/\"//g')" - elif [[ $use_labels = yes ]]; then - bootfslabel=$(/sbin/blkid -c /dev/null -s LABEL $boot_dev | awk -F"\"" '{ print $2 }') - if [[ -n $bootfslabel ]]; then - boot_part="LABEL=$bootfslabel" - else - bootfslabel=$(yad --entry --title=$"Filesystem Label" --center --text=$"Enter a disk label for $boot_dev" --width=300 --button=$"OK":0) - if [[ -n $bootfslabel ]]; then - e2label "$boot_dev" "$bootfslabel" - boot_part="LABEL=$bootfslabel" - else - boot_part="$boot_dev" - fi - fi - else - boot_part="$boot_dev" - fi - echo -e "$boot_part\t/boot\t$fs_type_boot\tdefaults,noatime,\t0\t2" >> /target/etc/fstab - check_exit -fi - - -# add entry for swap to fstab if needed -if [[ $use_existing_swap = "yes" ]] ; then - if [[ $use_uuid = yes ]]; then - swap_part="$(/sbin/blkid -s UUID $swap_dev | awk '{ print $2 }' | sed 's/\"//g')" - else - swap_part="$swap_dev" - fi - echo -e $"\n Adding swap entry to fstab...\n" - echo -e "$swap_part\tswap\tswap\tdefaults\t0\t0" >> /target/etc/fstab -else - echo -e "/swapfile\tswap\tswap\tdefaults\t0\t0" >> /target/etc/fstab -fi - - -# Add entry for root filesystem to crypttab if needed -if [[ $encrypt_os = yes ]] ; then - echo -e "root_fs\t\t$install_dev\t\tnone\t\tluks" >> /target/etc/crypttab -fi - - -# Add entry for /home to crypttab if needed -if [[ $encrypt_home = yes ]] ; then - echo -e "home_fs\t\t$home_dev\t\tnone\t\tluks" >> /target/etc/crypttab -fi - - -# mount stuff so grub will behave (so chroot will work) -mount --bind /dev/ /target/dev/ ; check_exit -mount --bind /proc/ /target/proc/ ; check_exit -mount --bind /sys/ /target/sys/ ; check_exit - - -# Allow users to login to ssh with passwords if desired. -# Allow root login only with auth keys. -# or do nothing. -if [[ $ssh_pass = "yes" ]] ; then - sed -i~ 's/PasswordAuthentication no/PasswordAuthentication yes/' /target/etc/ssh/sshd_config - sed -i 's/PermitRootLogin yes/PermitRootLogin without-password/' /target/etc/ssh/sshd_config -elif [[ $ssh_pass = "no" ]] ; then - sed -i~ 's/ PasswordAuthentication yes/PasswordAuthentication no/' /target/etc/ssh/sshd_config - sed -i 's/PermitRootLogin yes/PermitRootLogin without-password/' /target/etc/ssh/sshd_config -elif [[ -n "$ssh_pass" ]] ; then - echo $"WARNING: ssh_pass value not recognized. No changes were made to /etc/ssh/sshd_config" -fi - - -install_grub () { -# Setup GRUB -echo $"Setting up grub bootloader.. Please wait.." - -# If /boot is separate partition, need to mount it in chroot for grub -if [[ -n $boot_dev ]] ; then - chroot /target mount $boot_dev /boot -fi - - -# If grub is installed to a partition, we need to know if it's grub-pc -# or grub-legacy/grub-gfx to handle it properly. -if [[ -n $grub_partition ]] ; then - if [[ $grubversion != "grub-pc" ]] ; then - - # isolate the device (sdx) letter then use tr like this to translate to the right number for grub - GRUBDEVICENUM=$(echo $grub_partition |sed 's:/dev/sd::' |sed 's:[0-9]::'g |tr '[a-j]' '[0-9]') - - # isolate the partition number - INSTALLPARTNUM=$(echo $grub_partition |sed 's:/dev/sd::'|sed 's:[a-z]::') - - # and reduce it by 1 for grub - GRUBPARTNUM=$(expr $INSTALLPARTNUM - 1) - - # finally get the finished grub root syntax - GRUBROOT="(hd$GRUBDEVICENUM,$GRUBPARTNUM)" - - - chroot /target grub-install $grub_partition - grub --batch <<EOF - root $GRUBROOT - setup $GRUBROOT - quit -EOF - - else - error_message=$"grub-install failed." - chroot /target grub-install --recheck --no-floppy --force $grub_partition >> "$error_log" ; check_exit - fi -fi - - -if [[ -n $grub_dev ]]; then - echo -e $"\n Installing GRUB boot loader...\n" >> "$error_log" - error_message=$"grub-install failed." - chroot /target grub-install $grub_dev >> "$error_log" ; check_exit -fi - -error_message="" -} - -if [[ -n "$grub_dev" ]] ; then - install_grub | tee >(yad --title=$"Installing GRUB bootloader..." --progress --pulsate --auto-close --width 300) -fi - -#****************************************************************** - -# Run update-initramfs to include dm-mod if using encryption -if [[ $encrypt_os = yes ]] || [[ $encrypt_home = yes ]] ; then - if [[ -f /usr/sbin/update-initramfs.orig.initramfs-tools ]] ; then - chroot /target /usr/sbin/update-initramfs.orig.initramfs-tools -u >> "$error_log" - else - chroot /target /usr/sbin/update-initramfs -u >> "$error_log" - fi -fi - - -#****************************************************************** - - - -if [[ -n $grub_dev ]] || [[ -n $grub_partition ]] ; then - chroot /target update-grub ; check_exit -fi - -if [ -f /target/boot/grub/setup_left_core_image_in_filesystem ]; then -rm -f /target/boot/grub/setup_left_core_image_in_filesystem -fi - -# INSTALLATION FINISHED - BEGIN CONFIGURE USERNAME, HOSTNAME, PASSWORDS, SUDO - - -# Need to mount the target home partition under the target root partition -# so the commands can find it (for changing user configs gksu) -if [[ $sep_home = "yes" ]]; then - mount $home_part /target/home -fi - - -# it might not be on in some live builds -chroot /target /bin/bash -c "shadowconfig on" - -oldname=$(awk -F: '/1000:1000/ { print $1 }' /target/etc/passwd) -old_realname=$(cat /target/etc/passwd |grep "^$oldname"|sed "s/,,,//"|awk -F ":" '{print $5}') - -username_dialog() { - - newuser=$(yad --form --title=$"Configure hostname and username..." --center --button=$"OK":0 \ - --text=$"\n You should change the hostname and username \n \ - (optional but recommended) \n" \ - --field=$"New hostname \(no spaces\):" \ - --field=$"New username \(no spaces\):" \ - --field=$"New user's 'real name' \(e.g. John Smith\):" \ - --field=$"Permit sudo for new user\?":CHK \ - --field=$"Use sudo as default for new user\?":CHK \ - --field=$"Use sudo only for shutdown\?":CHK \ - "$HOSTNAME" "$oldname" "$old_realname" FALSE FALSE TRUE) - - new_hostname=$(echo $newuser |awk -F "|" '{print $1}') - newname=$(echo $newuser |awk -F "|" '{print $2}') - new_realname=$(echo $newuser |awk -F "|" '{print $3}') - sudoconfig=$(echo $newuser |awk -F "|" '{print $4}') - sudo_is_default=$(echo $newuser |awk -F "|" '{print $5}') - sudo_shutdown=$(echo $newuser |awk -F "|" '{print $6}') -} - -username_dialog - - - -# Test to make sure new_hostname is a legal hostname, let user fix it if it's not. -fix_hostname () { - new_hostname=$(yad --entry --title=$"Change hostname" --center \ - --text=$"Illegal hostname. Try again. - -You can use alphanumeric characters anywhere in the hostname, and -you can use the minus sign (-) as long as it's not at the beginning or end." \ - --entry-text=$"$HOSTNAME" --width=500 --button=$"OK":0) - test_hostname -} - - -test_hostname () { - if [[ $new_hostname =~ "$"|"%"|"("|")"|"*"|"_"|"@"|"~"|"!"|"#"|"="|"+"|"&"|"^"|":"|";"|"'"|","|"."|"<"|">"|"?"|"{"|"}"|"["|"]"|"/"|"|"|" " ]]; then - fix_hostname - elif [[ $new_hostname =~ "\""|"\`" ]];then - fix_hostname - elif [[ $new_hostname = -* ]] || [[ $new_hostname = *- ]]; then - fix_hostname - elif [[ -z $new_hostname ]]; then - new_hostname="$HOSTNAME" - fi -} - - -# do hostname -if [[ $new_hostname != $HOSTNAME ]]; then - test_hostname - sed -i "s/$HOSTNAME/$new_hostname/" /target/etc/hostname - sed -i "s/$HOSTNAME/$new_hostname/g" /target/etc/hosts -fi - -# do username -if [ -z "$newname" ]; then -newname=$oldname -fi - -if [ "$oldname" != "$newname" ]; then - - chroot /target usermod -l $newname $oldname ; check_exit - chroot /target groupmod -n $newname $oldname ; check_exit - chroot /target usermod -d /home/$newname -m $newname ; check_exit - - for i in $(grep -r "/home/$oldname" /target/home/$newname/.config | awk -F":" '{ print $1 }'); do - sed -i "s/\/home\/$oldname/\/home\/$newname/g" "$i" - done - - for i in $(grep -r "/home/$oldname" /target/home/$newname/.local | awk -F":" '{ print $1 }'); do - sed -i "s/\/home\/$oldname/\/home\/$newname/g" "$i" - done -fi - -#sed -i~ "s/$old_realname,,,/$new_realname,,,/" /target/etc/passwd -chroot /target /bin/bash -c "chfn -f '$new_realname' $newname" - - -## sort sudo ## - -# =>wheezy live-config now uses /etc/sudoers.d -if [ -e /target/etc/sudoers.d/live ]; then -rm -f /target/etc/sudoers.d/live -fi - -oldusername=$(awk -F: '/1000:1000/ { print $1 }' /etc/passwd) -newusername=$(awk -F: '/1000:1000/ { print $1 }' /target/etc/passwd) - -# squeeze (or other distro) might have used /etc/sudoers -if grep -qs $oldusername /target/etc/sudoers ; then -sed -i "/$oldusername/d" /target/etc/sudoers -fi - -if [ "$sudoconfig" = "TRUE" ] || [ "$sudo_is_default" = "TRUE" ]; then - # $newusername is permitted to use sudo so add him to sudo group - chroot /target usermod -a -G sudo $newusername - - # it shoud be already there in =>wheezy.. in case it's not: - if ! grep -qs "^%sudo" /target/etc/sudoers ; then - echo "%sudo ALL=(ALL:ALL) ALL" >> /etc/sudoers - fi -fi - -if [ "$sudo_is_default" != "TRUE" ]; then - - # files that may have been written by live-config to force live sudo mode - - # should they just be deleted? - - # rm -f /target/home/*/.gconf/apps/gksu/%gconf.xml - # rm -f /target/home/*/.*/share/config/*desurc - - # fix gksu in user's home ($newusername will not use sudo by default) - if [ -f /target/home/"$newusername"/.gconf/apps/gksu/%gconf.xml ]; then - sed -i '/sudo-mode/s/true/false/' /target/home/"$newusername"/.gconf/apps/gksu/%gconf.xml - fi - - sed -i 's/SU_TO_ROOT_SU=sudo/SU_TO_ROOT_SU=su/' /target/home/$newusername/.su-to-rootrc - # detects .kde/ .kde4/ .trinity/ (kdesurc or tdesurc) - for file in /target/home/$newusername/.*/share/config/*desurc ; do - sed -i 's/super-user-command=sudo/super-user-command=su/' $file - done -fi - -if [ "$sudo_shutdown" = "TRUE" ]; then - sudo_include_file="/target/etc/sudoers.d/user_shutdown" - if [ -f "$sudo_include_file" ]; then - mv "$sudo_include_file" "${sudo_include_file}.old" - fi - echo "$newusername ALL= NOPASSWD: /usr/sbin/pm-suspend, /usr/sbin/pm-hibernate, /sbin/halt, /sbin/reboot" > "$sudo_include_file" -fi - - -if [[ $disable_auto_desktop = "yes" ]]; then - set_noautologin_desktop - disable_auto_console="yes" -else - set_autologin_desktop -fi - - -# Disable console autologin -if [[ $disable_auto_console = "yes" ]]; then - if grep -q "respawn:/bin/login -f" /target/etc/inittab ; then - mv /target/etc/inittab /target/etc/inittab.$(date +%Y%m%d_%H%M) - cp /usr/lib/refractainstaller/inittab.debian /target/etc/inittab - fi -else - sed -i "/respawn:/s/$oldusername/$newusername/g" /target/etc/inittab -fi - -# live-config also writes directory /home/user/.kde -# if kde is not installed it should be removed ! - - -## passwords ## - -clean_log() { - - # clear the log of plain-text passwords - if [ -n "$newpass" ]; then - sed -i "s|$newpass|\*\*\*\*|"g $error_log - fi - - if [ -n "$confirm_newpass" ]; then - sed -i "s|$confirm_newpass|\*\*\*\*|"g $error_log - fi - newpass="" - confirm_newpass="" -} - -pass_error() { - - clean_log - use_existing="" - disable_root="" - - yad --title=$"Configure $pass_dialog password" --center --image="gtk-dialog-error" --width=320 --button=$"OK":0 \ - --text=$" Passwords do not match (or checkbox error) \n\n Please try again " -} - -configure_pass() { - -clean_log - -pass_entry=$(yad --form --title=$"Configure $pass_dialog password" --center --button=$"OK":0 \ ---text=$"You should reset the $pass_dialog password.\n" \ ---field=$"Enter new $pass_dialog password::H" \ ---field=$"Confirm new $pass_dialog password::H" \ ---field=$"Use current password\? (not recommended)":CHK \ -"$field_four") - -# TODO check for illegal characters? - -newpass=$(echo $pass_entry|awk -F "|" '{print $1}') -confirm_newpass=$(echo $pass_entry|awk -F "|" '{print $2}') -use_existing=$(echo $pass_entry|awk -F "|" '{print $3}') -disable_root=$(echo $pass_entry|awk -F "|" '{print $4}') - - if [ "$use_existing" = "TRUE" ] && [ "$disable_root" = "TRUE" ] ; then - pass_error - configure_pass - fi - - if [ -n "$newpass" ] && [ "$use_existing" = "TRUE" ]; then - pass_error - configure_pass - fi - - if [ "$use_existing" = "TRUE" ] || [ "$disable_root" = "TRUE" ] ; then - return - fi - - if [ -z "$newpass" ] || [ "$newpass" != "$confirm_newpass" ]; then - pass_error - configure_pass - fi -} - -# do root password -set_rootpass() { - if [ "$sudo_is_default" = "TRUE" ]; then - field_four=$'--field=Disable root account\? \(not recommended\):CHK' - fi - - pass_dialog=root - configure_pass - - if [ "$disable_root" = "TRUE" ]; then - echo $"disabling root account.. " - - # replace second field with "*" in /etc/shadow - rootpass_hash=$(cat /target/etc/shadow|grep ^root| awk -F ":" '{print $3 ":" $4 ":" $5 ":" $6}') - sed -i "s|^root:.*|root:\*:${rootpass_hash}:::|" /target/etc/shadow - else - if [ -n "$newpass" ]; then - chroot /target /bin/bash -c "echo -e \"$newpass\n$newpass\n\" | passwd root" - #else do nothing, keep old password - fi - fi - - clean_log -} - -# do user password -set_userpass() { - -pass_dialog=user -field_four="" -configure_pass - - if [ -n "$newpass" ]; then - chroot /target /bin/bash -c "echo -e \"$newpass\n$newpass\n\" | passwd $newusername" - # else do nothing, keep old password - fi - -clean_log -} - -set_rootpass -set_userpass - -# Run any post-install scripts -if [[ $run_postinstall = "yes" ]] ; then - for file in /usr/lib/refractainstaller/post-install/* ; do - if [[ -x "$file" ]] ; then - bash "$file" - fi - done -fi - - - -yad --image=gtk-dialog-info --title="$window_title" --center --text=$" Installation complete. \n\n You may now reboot into the new system.\n\n Remember to remove your installation media.\n" --width=500 --button=$"OK":0 - -# copy error log to installation now before calling cleanup function -cp "$error_log" /target/home/"$newusername"/ -chown 1000:1000 /target/home/"$newusername"/"${error_log##*/}" -cleanup - -exit 0 - diff --git a/blends/devuan-desktop-live/rootfs-overlay/usr/lib/refractainstaller/pre-install/loc-timezn.sh b/blends/devuan-desktop-live/rootfs-overlay/usr/lib/refractainstaller/pre-install/loc-timezn.sh @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# loc-timezn.sh - - -# Send errors to the installer's error log. -error_log=$(grep error_log /etc/refractainstaller.conf | cut -d"\"" -f2) -exec 2>> "$error_log" - - -# comment all locales in locale.gen -sed -i '/^[a-z][a-z]_/s/^/# /' /etc/locale.gen - -# find the current active locale and uncomment it -CURRENT_LOCALE=$(grep -v ^\# /etc/default/locale | cut -d= -f2) -if [[ -n "$CURRENT_LOCALE" ]] ; then - sed -i "s/# $CURRENT_LOCALE/$CURRENT_LOCALE/" /etc/locale.gen -fi - -# This lets you choose time zone and locale (language) at the beginning -# of the installation process. Un-comment the keyboard-configuration -# if you want that to run, too. -# GUI falls back to terminal automatically on failure. - -if [[ $DISPLAY ]] ; then - dpkg-reconfigure -fgnome tzdata - dpkg-reconfigure -fgnome locales - dpkg-reconfigure -fgnome keyboard-configuration - dpkg-reconfigure -fgnome popularity-contest -else - echo -e "\n\tSet time zone and locales.\n" - sleep 2 - dpkg-reconfigure tzdata - dpkg-reconfigure locales - dpkg-reconfigure keyboard-configuration - dpkg-reconfigure popularity-contest -fi - - - - -exit 0 diff --git a/blends/devuan-desktop-live/rootfs-overlay/usr/local/bin/adjfontsize b/blends/devuan-desktop-live/rootfs-overlay/usr/local/bin/adjfontsize @@ -1,34 +0,0 @@ -#!/bin/bash -# adjust fontsizes; $0 +|- -# (c) J.Reisenweber 2017, GPLv2 - -PROPLIST=$(cat <<EndOfList -xsettings /Gtk/FontName -xfwm4 /general/title_font -EndOfList -) - -case $1 in - +|up|larger) A=2; B=3 ;; - -|down|smaller) A=3; B=2 ;; - *) echo "wrong parameter $1"; exit 5 ;; -esac; - - -adjprop(){ - echo -n "$1 $2: " - local VAL=$(xfconf-query -c $1 -p $2) - local FONT=${VAL%%[0-9]*} - local SIZE=${VAL##$FONT} - echo -n "\"${FONT}${SIZE}\" -> " - SIZE=$(( SIZE * B / A )) - echo "\"${FONT}${SIZE}\"" - xfconf-query -c $1 -p $2 -s "${FONT}${SIZE}" - return $? -} - -echo "$PROPLIST" | while read CHANNEL PROPERTY; -do - adjprop $CHANNEL $PROPERTY; -done; -exit diff --git a/blends/devuan-desktop-live/rootfs-overlay/usr/local/bin/remove-non-free-firmware b/blends/devuan-desktop-live/rootfs-overlay/usr/local/bin/remove-non-free-firmware @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# remove_non-free_firmware - - -apt-get --purge --yes remove b43-fwcutter firmware-atheros firmware-b43-installer firmware-b43legacy-installer firmware-bnx2 firmware-bnx2x firmware-brcm80211 firmware-intelwimax firmware-iwlwifi firmware-libertas firmware-linux-nonfree firmware-myricom firmware-netxen firmware-qlogic firmware-ralink firmware-realtek firmware-ti-connectivity firmware-zd1211 - -apt-get autoremove - -exit 0 diff --git a/blends/devuan-desktop-live/setnet_0.3.2-1_all.deb b/blends/devuan-desktop-live/setnet_0.3.2-1_all.deb Binary files differ. diff --git a/blends/devuan-desktop-live/yad_0.27.0-1_amd64.deb b/blends/devuan-desktop-live/yad_0.27.0-1_amd64.deb Binary files differ. diff --git a/blends/devuan-desktop-live/yad_0.27.0-1_i386.deb b/blends/devuan-desktop-live/yad_0.27.0-1_i386.deb Binary files differ.