View | Details | Raw Unified | Return to bug 478975
Collapse All | Expand All

(-)ProductCreator.ycp (+23 lines)
Lines 2034-2039 Link Here
2034
    ret = Exec(command);
2034
    ret = Exec(command);
2035
    if (!ret) return false;
2035
    if (!ret) return false;
2036
2036
2037
    if (new_file != "linuxrc.config")
2038
    {
2039
	// extract installkey.gpg from cpio archive
2040
	command = sformat ("cd '%1'; cpio -i -H newc -F '%2.cpio' installkey.gpg",
2041
	    String::Quote(base), String::Quote(initrd_file));
2042
2043
	ret = Exec(command);
2044
	if (!ret) return false;
2045
2046
	// add our new key to installkey.gpg keyring
2047
	command = sformat ("cd '%1'; gpg --no-default-keyring --keyring ./installkey.gpg --import '%2'",
2048
	    String::Quote(base), String::Quote(new_file));
2049
	ret = Exec(command);
2050
	if (!ret) return false;
2051
2052
	// place new installkey.gpg back to the archive
2053
	command = sformat ("cd '%1' && echo installkey.gpg | cpio -o -H newc -A -F '%2.cpio'",
2054
	    String::Quote(base), String::Quote(initrd_file));
2055
2056
	ret = Exec(command);
2057
	if (!ret) return false;
2058
    }
2059
2037
    // compress the archive, remove the temporary files
2060
    // compress the archive, remove the temporary files
2038
    command = sformat("gzip --best < '%1.cpio' > '%1' && rm -f '%1.cpio' '%2'",
2061
    command = sformat("gzip --best < '%1.cpio' > '%1' && rm -f '%1.cpio' '%2'",
2039
	String::Quote(initrd_file), String::Quote(new_file));
2062
	String::Quote(initrd_file), String::Quote(new_file));

Return to bug 478975