diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2018-05-25 00:24:35 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2018-05-27 06:26:01 -0400 |
commit | 252fe82fc6c60200b13d19cf762f011608d815df (patch) | |
tree | 2b99fffa0a5f846fcce44d4fc8f1d50594977e75 | |
parent | b0882e365025b8de4890816fc54bad7da6dd9f0c (diff) |
write grub config
-rw-r--r-- | src/modules/pacstrap-base/pacstrap-base.conf | 1 | ||||
-rw-r--r-- | src/modules/pacstrap-base/pacstrap-base.cpp | 8 | ||||
-rw-r--r-- | src/modules/pacstrap-base/pacstrap-base.h | 2 | ||||
-rw-r--r-- | src/modules/pacstrap-gui/pacstrap-gui.cpp | 8 | ||||
-rw-r--r-- | src/modules/pacstrap-gui/pacstrap-gui.h | 4 |
5 files changed, 21 insertions, 2 deletions
diff --git a/src/modules/pacstrap-base/pacstrap-base.conf b/src/modules/pacstrap-base/pacstrap-base.conf index 06f2d610e..80ae271bd 100644 --- a/src/modules/pacstrap-base/pacstrap-base.conf +++ b/src/modules/pacstrap-base/pacstrap-base.conf @@ -3,6 +3,7 @@ bootloader: - "grub" + - "grub2-theme-gnuaxiom" - "mkinitcpio-openswap" kernel: diff --git a/src/modules/pacstrap-base/pacstrap-base.cpp b/src/modules/pacstrap-base/pacstrap-base.cpp index 73825667f..2c8237f4c 100644 --- a/src/modules/pacstrap-base/pacstrap-base.cpp +++ b/src/modules/pacstrap-base/pacstrap-base.cpp @@ -25,9 +25,11 @@ /* PacstrapBaseJob private class constants */ // const QString PacstrapBaseJob::GRUB_CRYPTO_FMT = "sed -i 's|^#GRUB_ENABLE_CRYPTODISK=y|GRUB_ENABLE_CRYPTODISK=y|' %1/etc/default/grub" ; -const QString PacstrapBaseJob::GRUB_THEME_FMT = "sed -i 's|^#GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/parabola-laf/theme.txt|' %1/etc/default/grub" ; +const QString PacstrapBaseJob::GRUB_THEME_FMT = "sed -i 's|^#GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/GNUAxiom/theme.txt|' %1/etc/default/grub" ; +const QString PacstrapBaseJob::GRUB_CONFIG_FMT = "grub-mkconfig -o %1/boot/grub/grub.cfg" ; // const QString PacstrapBaseJob::GRUB_CRYPTO_ERROR_MSG = "The grub enable crypto command has failed." ; -const QString PacstrapBaseJob::GRUB_THEME_ERROR_MSG = "The grub define theme command has failed." ; +const QString PacstrapBaseJob::GRUB_THEME_ERROR_MSG = "The grub theme command has failed." ; +const QString PacstrapBaseJob::GRUB_CONFIG_ERROR_MSG = "The grub-mkconfig command has failed." ; /* PacstrapBaseJob public instance methods */ @@ -59,9 +61,11 @@ QString PacstrapBaseJob::chrootExecPostInstall() { // QString grub_crypto_cmd = GRUB_CRYPTO_FMT.arg(this->mountPoint) ; QString grub_theme_cmd = GRUB_THEME_FMT .arg(this->mountPoint) ; + QString grub_config_cmd = GRUB_CONFIG_FMT.arg(this->mountPoint) ; // if (!!execStatus(grub_crypto_cmd)) return GRUB_CRYPTO_ERROR_MSG ; if (!!execStatus(grub_theme_cmd )) return GRUB_THEME_ERROR_MSG ; + if (!!execStatus(grub_config_cmd)) return GRUB_CONFIG_ERROR_MSG ; printf("[PACSTRAP-JOB]: FIXME: this->mountPoint/etc/os-release: %s\n" , execOutput(QString("ls -l %1/etc/os-release").arg(this->mountPoint))) ; // FIXME: execStatus(QString("touch %1/etc/os-release").arg(this->mountPoint)) ; // FIXME: diff --git a/src/modules/pacstrap-base/pacstrap-base.h b/src/modules/pacstrap-base/pacstrap-base.h index 39fee2b84..f339b5cd6 100644 --- a/src/modules/pacstrap-base/pacstrap-base.h +++ b/src/modules/pacstrap-base/pacstrap-base.h @@ -45,8 +45,10 @@ private: // static const QString GRUB_CRYPTO_FMT ; static const QString GRUB_THEME_FMT ; + static const QString GRUB_CONFIG_FMT ; // static const QString GRUB_CRYPTO_ERROR_MSG ; static const QString GRUB_THEME_ERROR_MSG ; + static const QString GRUB_CONFIG_ERROR_MSG ; } ; diff --git a/src/modules/pacstrap-gui/pacstrap-gui.cpp b/src/modules/pacstrap-gui/pacstrap-gui.cpp index 85fe99858..61d4bcffc 100644 --- a/src/modules/pacstrap-gui/pacstrap-gui.cpp +++ b/src/modules/pacstrap-gui/pacstrap-gui.cpp @@ -41,6 +41,10 @@ const QString PacstrapGuiJob::DM_LANG_FMT = "sed -i 's|^Language=.*|Langua const QString PacstrapGuiJob::WELCOME_TITLE_FMT = "sed -i 's|_EDITION_TITLE_|Parabola GNU/Linux-libre News|' %1/usr/bin/autostart.sh" ; const QString PacstrapGuiJob::WELCOME_TEXT_FMT = "sed 's|_DEFAULT_DESKTOP_|%1|' /usr/share/calamares/welcome > %2/usr/share/parabola-laf/news/news-0" ; const QString PacstrapGuiJob::OCTOPI_FMT = "rm -f %1/etc/xdg/autostart/octopi-notifier.desktop" ; +const QString PacstrapGuiJob::GRUB_THEME_FMT = "sed -i 's|^#GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/parabola-laf/theme.txt|' %1/etc/default/grub" ; // TODO:: delegate this to parabola-laf +const QString PacstrapGuiJob::GRUB_CONFIG_FMT = "grub-mkconfig -o %1/boot/grub/grub.cfg" ; // TODO:: delegate this to parabola-laf +const QString PacstrapGuiJob::GRUB_THEME_ERROR_MSG = "The grub theme command has failed." ; // TODO:: delegate this to parabola-laf +const QString PacstrapGuiJob::GRUB_CONFIG_ERROR_MSG = "The grub-mkconfig command has failed." ; // TODO:: delegate this to parabola-laf /* PacstrapGuiJob public instance methods */ @@ -94,6 +98,10 @@ QString PacstrapGuiJob::chrootExecPostInstall() QString welcome_title_cmd = QString(WELCOME_TITLE_FMT).arg( this->mountPoint) ; QString welcome_text_cmd = QString(WELCOME_TEXT_FMT ).arg(default_desktop , this->mountPoint) ; QString octopi_cmd = QString(OCTOPI_FMT ).arg( this->mountPoint) ; + // TODO: above *_FMT already are QString - no need to wrap them + QString grub_config_cmd = GRUB_CONFIG_FMT.arg(this->mountPoint) ; // TODO:: delegate this to parabola-laf + + if (!!execStatus(grub_config_cmd)) return GRUB_CONFIG_ERROR_MSG ; // TODO:: delegate this to parabola-laf printf("[PACSTRAP-GUI]: ls host/etc/skel%s\n" , execOutput( "ls -al /etc/skel" ) .toStdString().c_str()) ; printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ IN\n%s\n" , execOutput(QString("ls -al %1/etc/skel" ).arg(this->mountPoint)).toStdString().c_str()) ; diff --git a/src/modules/pacstrap-gui/pacstrap-gui.h b/src/modules/pacstrap-gui/pacstrap-gui.h index 2959968a5..0ab4c220f 100644 --- a/src/modules/pacstrap-gui/pacstrap-gui.h +++ b/src/modules/pacstrap-gui/pacstrap-gui.h @@ -59,6 +59,10 @@ private: static const QString WELCOME_TEXT_FMT ; static const QString WELCOME_SED_FMT ; static const QString OCTOPI_FMT ; + static const QString GRUB_THEME_FMT ; + static const QString GRUB_CONFIG_FMT ; + static const QString GRUB_CONFIG_ERROR_MSG ; + static const QString GRUB_THEME_ERROR_MSG ; } ; |