Copying same file shouldn't crash (#1269213)
When using the template install command copying the same file to itself
shouldn't crash. Just log the error and continue.
Also copy the s390 configuration files for use with livemedia-creator
Resolves: rhbz#1269213
(cherry picked from commit 701ab02619
)
This commit is contained in:
parent
424fdd5cda
commit
391f1a7b57
5
share/live/config_files/s390/generic.ins
Normal file
5
share/live/config_files/s390/generic.ins
Normal file
@ -0,0 +1,5 @@
|
||||
* minimal lpar ins file
|
||||
images/kernel.img 0x00000000
|
||||
images/initrd.img @INITRD_LOAD_ADDRESS@
|
||||
images/genericdvd.prm 0x00010480
|
||||
images/initrd.addrsize 0x00010408
|
1
share/live/config_files/s390/generic.prm
Normal file
1
share/live/config_files/s390/generic.prm
Normal file
@ -0,0 +1 @@
|
||||
ro ramdisk_size=40000 cio_ignore=all,!condev
|
1
share/live/config_files/s390/genericdvd.prm
Normal file
1
share/live/config_files/s390/genericdvd.prm
Normal file
@ -0,0 +1 @@
|
||||
ro ramdisk_size=40000 cio_ignore=all,!condev rd.cmdline=ask
|
9
share/live/config_files/s390/redhat.exec
Normal file
9
share/live/config_files/s390/redhat.exec
Normal file
@ -0,0 +1,9 @@
|
||||
/* */
|
||||
'CL RDR'
|
||||
'PURGE RDR ALL'
|
||||
'SPOOL PUNCH * RDR'
|
||||
'PUNCH KERNEL IMG A (NOH'
|
||||
'PUNCH GENERIC PRM A (NOH'
|
||||
'PUNCH INITRD IMG A (NOH'
|
||||
'CH RDR ALL KEEP NOHOLD'
|
||||
'I 00C'
|
@ -26,6 +26,7 @@ logger = logging.getLogger("pylorax.ltmpl")
|
||||
import os, re, glob, shlex, fnmatch
|
||||
from os.path import basename, isdir
|
||||
from subprocess import CalledProcessError
|
||||
import shutil
|
||||
|
||||
from sysutils import joinpaths, cpfile, mvfile, replace, remove
|
||||
from yumhelper import * # Lorax*Callback classes
|
||||
@ -231,7 +232,10 @@ class LoraxTemplateRunner(object):
|
||||
install /usr/share/myconfig/grub.conf.in /boot/grub.conf
|
||||
'''
|
||||
for src in rglob(self._in(srcglob), fatal=True):
|
||||
try:
|
||||
cpfile(src, self._out(dest))
|
||||
except shutil.Error as e:
|
||||
logger.error(e)
|
||||
|
||||
def installimg(self, srcdir, destfile):
|
||||
'''
|
||||
@ -362,7 +366,10 @@ class LoraxTemplateRunner(object):
|
||||
If DEST doesn't exist, SRC will be copied to a file with
|
||||
that name, if the path leading to it exists.
|
||||
'''
|
||||
try:
|
||||
cpfile(self._out(src), self._out(dest))
|
||||
except shutil.Error as e:
|
||||
logger.error(e)
|
||||
|
||||
def move(self, src, dest):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user