Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Calamares
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
Calamares
Commits
a311770e
Commit
a311770e
authored
Aug 1, 2014
by
Teo Mrnjavac
Browse files
Options
Downloads
Patches
Plain Diff
Use libcalamares.utils.chroot_call in grub jobmodule.
parent
cc2e49c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/grub/main.py
+4
-11
4 additions, 11 deletions
src/modules/grub/main.py
with
4 additions
and
11 deletions
src/modules/grub/main.py
+
4
−
11
View file @
a311770e
...
@@ -17,24 +17,17 @@
...
@@ -17,24 +17,17 @@
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
import
os
import
subprocess
import
libcalamares
import
libcalamares
def
chroot_call
(
root_mount_point
,
cmd
):
def
install_grub
(
boot_loader
):
subprocess
.
check_call
([
"
chroot
"
,
root_mount_point
]
+
cmd
)
def
install_grub
(
root_mount_point
,
boot_loader
):
install_path
=
boot_loader
[
"
installPath
"
]
install_path
=
boot_loader
[
"
installPath
"
]
chroot_call
(
root_mount_point
,
[
"
grub-install
"
,
install_path
])
libcalamares
.
utils
.
chroot_call
(
[
"
grub-install
"
,
install_path
])
chroot_call
(
root_mount_point
,
[
"
grub-mkconfig
"
,
"
-o
"
,
"
/boot/grub/grub.cfg
"
])
libcalamares
.
utils
.
chroot_call
(
[
"
grub-mkconfig
"
,
"
-o
"
,
"
/boot/grub/grub.cfg
"
])
def
run
():
def
run
():
root_mount_point
=
libcalamares
.
globalstorage
.
value
(
"
rootMountPoint
"
)
boot_loader
=
libcalamares
.
globalstorage
.
value
(
"
bootLoader
"
)
boot_loader
=
libcalamares
.
globalstorage
.
value
(
"
bootLoader
"
)
install_grub
(
root_mount_point
,
boot_loader
)
install_grub
(
boot_loader
)
return
None
return
None
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment