Don't overwrite the config files if they are already present

This commit is contained in:
Gregory Kurtzer
2021-04-24 16:36:45 -07:00
parent 083c7bbe33
commit 98940c0483

View File

@@ -53,7 +53,10 @@ files: all
install -d -m 0755 $(DESTDIR)/etc/warewulf/
install -d -m 0755 $(DESTDIR)/etc/warewulf/ipxe
install -d -m 0755 $(DESTDIR)/var/lib/tftpboot/warewulf/ipxe/
cp -r etc/* $(DESTDIR)/etc/warewulf/
test -f $(DESTDIR)/etc/warewulf/warewulf.conf || install -m 644 etc/warewulf.conf $(DESTDIR)/etc/warewulf/
test -f $(DESTDIR)/etc/warewulf/hosts.tmpl || install -m 644 etc/hosts.tmpl $(DESTDIR)/etc/warewulf/
cp -r etc/dhcp $(DESTDIR)/etc/warewulf/
cp -r etc/ipxe $(DESTDIR)/etc/warewulf/
cp -r overlays $(DESTDIR)/var/warewulf/
chmod +x $(DESTDIR)/var/warewulf/overlays/system/default/init
chmod 600 $(DESTDIR)/var/warewulf/overlays/system/default/etc/ssh/ssh*