more splits
This commit is contained in:
parent
9ffe4d214f
commit
022a4138d2
49
src/installation_progress_page/auto_basic.rs
Normal file
49
src/installation_progress_page/auto_basic.rs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
pub const standard_installation_prog: &str = r###"#! /bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SOCKET_PATH="/tmp/pikainstall-status.sock"
|
||||||
|
|
||||||
|
PIKA_INSTALL_CHROOT_PATH={CHROOT_PATH}
|
||||||
|
PIKA_INSTALL_LOCALE={LOCALE}
|
||||||
|
PIKA_INSTALL_KEYMAP_BASE={KEYMAP_BASE}
|
||||||
|
PIKA_INSTALL_KEYMAP_VARIANT={KEYMAP_VARIANT}
|
||||||
|
PIKA_INSTALL_TIMEZONE={TIMEZONE}
|
||||||
|
|
||||||
|
touch "/tmp/pika-installer-gtk4-status.txt"
|
||||||
|
echo 'PARTING' | nc -U $SOCKET_PATH
|
||||||
|
|
||||||
|
"###;
|
||||||
|
|
||||||
|
pub const automatic_standard_installation_prog: &str = r###"
|
||||||
|
|
||||||
|
PIKA_INSTALL_AUTO_TARGET_DISK={AUTO_INSTALL_TARGET_DISK}
|
||||||
|
|
||||||
|
for part in $(/usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions | grep "$PIKA_INSTALL_AUTO_TARGET_DISK"); do
|
||||||
|
PARTITION="/dev/$part"
|
||||||
|
swapoff $PARTITION || true
|
||||||
|
done
|
||||||
|
|
||||||
|
wipefs -af /dev/"$AUTO_INSTALL_TARGET_DISK"
|
||||||
|
blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK"
|
||||||
|
|
||||||
|
"###;
|
||||||
|
|
||||||
|
pub const automatic_open_part_pikainstall_prog: &str = r###"
|
||||||
|
|
||||||
|
if [ -z $PIKA_INSTALL_KEYMAP_VARIANT ]
|
||||||
|
then
|
||||||
|
pikainstall -r $PIKA_INSTALL_CHROOT_PATH -l $PIKA_INSTALL_LOCALE -k $PIKA_INSTALL_KEYMAP_BASE -t $PIKA_INSTALL_TIMEZONE
|
||||||
|
else
|
||||||
|
pikainstall -r $PIKA_INSTALL_CHROOT_PATH -l $PIKA_INSTALL_LOCALE -k $PIKA_INSTALL_KEYMAP_BASE -t $PIKA_INSTALL_TIMEZONE
|
||||||
|
fi -kv $PIKA_INSTALL_KEYMAP_VARIANT
|
||||||
|
"###;
|
||||||
|
|
||||||
|
pub const automatic_locked_part_pikainstall_prog: &str = r###"
|
||||||
|
|
||||||
|
if [ -z $PIKA_INSTALL_KEYMAP_VARIANT ]
|
||||||
|
then
|
||||||
|
pikainstall -c $PIKA_INSTALL_AUTO_LUKS_PASSWORD -r $PIKA_INSTALL_CHROOT_PATH -l $PIKA_INSTALL_LOCALE -k $PIKA_INSTALL_KEYMAP_BASE -t $PIKA_INSTALL_TIMEZONE
|
||||||
|
else
|
||||||
|
pikainstall -c $PIKA_INSTALL_AUTO_LUKS_PASSWORD -r $PIKA_INSTALL_CHROOT_PATH -l $PIKA_INSTALL_LOCALE -k $PIKA_INSTALL_KEYMAP_BASE -t $PIKA_INSTALL_TIMEZONE
|
||||||
|
fi -kv $PIKA_INSTALL_KEYMAP_VARIANT
|
||||||
|
"###;
|
@ -8,35 +8,6 @@ use glib::{clone, closure_local};
|
|||||||
use gtk::{gio, glib};
|
use gtk::{gio, glib};
|
||||||
use std::{cell::RefCell, fs, ops::Deref, path::Path, process::Command, rc::Rc};
|
use std::{cell::RefCell, fs, ops::Deref, path::Path, process::Command, rc::Rc};
|
||||||
|
|
||||||
const standard_installation_prog:&str = r###"#! /bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
SOCKET_PATH="/tmp/pikainstall-status.sock"
|
|
||||||
|
|
||||||
PIKA_INSTALL_CHROOT_PATH={CHROOT_PATH}
|
|
||||||
PIKA_INSTALL_LOCALE={LOCALE}
|
|
||||||
PIKA_INSTALL_KEYMAP_BASE={KEYMAP_BASE}
|
|
||||||
PIKA_INSTALL_KEYMAP_VARIANT={KEYMAP_VARIANT}
|
|
||||||
|
|
||||||
touch "/tmp/pika-installer-gtk4-status.txt"
|
|
||||||
echo 'PARTING' | nc -U $SOCKET_PATH
|
|
||||||
|
|
||||||
"###;
|
|
||||||
|
|
||||||
const automatic_standard_installation_prog:&str = r###"
|
|
||||||
|
|
||||||
PIKA_INSTALL_AUTO_TARGET_DISK={AUTO_INSTALL_TARGET_DISK}
|
|
||||||
|
|
||||||
for part in $(/usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions | grep "$PIKA_INSTALL_AUTO_TARGET_DISK"); do
|
|
||||||
PARTITION="/dev/$part"
|
|
||||||
swapoff $PARTITION || true
|
|
||||||
done
|
|
||||||
|
|
||||||
wipefs -af /dev/"$AUTO_INSTALL_TARGET_DISK"
|
|
||||||
blockdev --rereadpt "$AUTO_INSTALL_TARGET_DISK"
|
|
||||||
|
|
||||||
"###;
|
|
||||||
|
|
||||||
pub fn create_installation_script(
|
pub fn create_installation_script(
|
||||||
language_selection_text_refcell: &Rc<RefCell<PikaLocale>>,
|
language_selection_text_refcell: &Rc<RefCell<PikaLocale>>,
|
||||||
keymap_selection_text_refcell: &Rc<RefCell<PikaKeymap>>,
|
keymap_selection_text_refcell: &Rc<RefCell<PikaKeymap>>,
|
||||||
|
Loading…
Reference in New Issue
Block a user