source: calamares/trunk/fuentes/src/modules/initramfs/main.py @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.3 KB
Line 
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3#
4# === This file is part of Calamares - <https://github.com/calamares> ===
5#
6#   Copyright 2014, Philip Müller <philm@manjaro.org>
7#   Copyright 2017, Alf Gaida <agaida@siduction.org>
8#
9#   Calamares is free software: you can redistribute it and/or modify
10#   it under the terms of the GNU General Public License as published by
11#   the Free Software Foundation, either version 3 of the License, or
12#   (at your option) any later version.
13#
14#   Calamares is distributed in the hope that it will be useful,
15#   but WITHOUT ANY WARRANTY; without even the implied warranty of
16#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17#   GNU General Public License for more details.
18#
19#   You should have received a copy of the GNU General Public License
20#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
21
22from libcalamares.utils import target_env_call
23
24
25def run():
26    """ Generate an initramfs image.
27
28    :return:
29    """
30    return_code = target_env_call(["update-initramfs", "-k", "all", "-c",
31                                   "-t"])
32
33    if return_code != 0:
34        return (
35            "Failed to run update-initramfs on the target",
36            "The exit code was {}".format(return_code)
37            )
Note: See TracBrowser for help on using the repository browser.