From 875f82c4010780bee1f6f98c4ff482e266733ea3e0ce3cd433e4d7c7a1042913 Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Mon, 16 May 2022 16:14:13 +0000 Subject: [PATCH] Accepting request 977577 from home:lee_duncan:branches:network - Set initiatorname in %post (at end of install), for cases where root is read-only at startup time (bsc#1198457) OBS-URL: https://build.opensuse.org/request/show/977577 OBS-URL: https://build.opensuse.org/package/show/network/open-iscsi?expand=0&rev=201 --- open-iscsi.changes | 6 ++++++ open-iscsi.spec | 3 +++ 2 files changed, 9 insertions(+) diff --git a/open-iscsi.changes b/open-iscsi.changes index 4e0d171..5d88a4f 100644 --- a/open-iscsi.changes +++ b/open-iscsi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 13 20:53:23 UTC 2022 - Lee Duncan + +- Set initiatorname in %post (at end of install), for cases + where root is read-only at startup time (bsc#1198457) + ------------------------------------------------------------------- Mon May 9 19:56:32 UTC 2022 - Lee Duncan diff --git a/open-iscsi.spec b/open-iscsi.spec index ba9c58b..145e057 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -143,6 +143,9 @@ mv %{buildroot}%{_sysconfdir}/logrotate.d/iscsiuiolog %{buildroot}%{_sysconfdir} %post %{?regenerate_initrd_post} +if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ] ; then + %{_sbindir}/iscsi-gen-initiatorname +fi %service_add_post iscsi.service iscsid.service iscsid.socket %posttrans