Ticket #789 (closed defect: fixed)
/etc/defaults oddness
Reported by: | lueningh | Owned by: | solj |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.0.1 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: | [email protected]… |
Description
After building an RPM of the bcfg 1.0.0 source and installing it on a fresh server, I couldn't start it up and it wasn't immediately obvious how to fix it:
mgt5:/var/lib/bcfg2 # /etc/init.d/bcfg2-server start bcfg2-server is disabled - see /etc/default/bcfg2-server failed mgt5:/var/lib/bcfg2 # ls /etc/default/bcfg2-server ls: /etc/default/bcfg2-server: No such file or directory
Looks like that file needs to be added to the packaging.
Attachments
Change History
comment:3 in reply to: ↑ description ; follow-up: ↓ 4 Changed 14 years ago by solj
Replying to lueningh:
After building an RPM of the bcfg 1.0.0 source and installing it on a fresh server, I couldn't start it up and it wasn't immediately obvious how to fix it:
mgt5:/var/lib/bcfg2 # /etc/init.d/bcfg2-server start bcfg2-server is disabled - see /etc/default/bcfg2-server failed mgt5:/var/lib/bcfg2 # ls /etc/default/bcfg2-server ls: /etc/default/bcfg2-server: No such file or directoryLooks like that file needs to be added to the packaging.
Does this help any
diff --git a/redhat/bcfg2.spec.in b/redhat/bcfg2.spec.in index 31351b1..e44ff34 100644 --- a/redhat/bcfg2.spec.in +++ b/redhat/bcfg2.spec.in @@ -85,15 +85,15 @@ Configuration management server %setup -q -n %{name}-%{version}-%{release} # fixup some paths -%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' debian/bcfg2.init +%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' redhat/scripts/bcfg2.init %{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' tools/bcfg2-cron %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.daily %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.hourly # don't start servers by default -%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' debian/bcfg2.init -%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' debian/bcfg2-server.init +%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' redhat/scripts/bcfg2.init +%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' redhat/scripts/bcfg2-server.init # get rid of extraneous shebangs for f in `find src/lib -name \*.py`
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 14 years ago by lueningh
That seems to be doing the same thing for me...
Replying to solj:
Replying to lueningh:
After building an RPM of the bcfg 1.0.0 source and installing it on a fresh server, I couldn't start it up and it wasn't immediately obvious how to fix it:
mgt5:/var/lib/bcfg2 # /etc/init.d/bcfg2-server start bcfg2-server is disabled - see /etc/default/bcfg2-server failed mgt5:/var/lib/bcfg2 # ls /etc/default/bcfg2-server ls: /etc/default/bcfg2-server: No such file or directoryLooks like that file needs to be added to the packaging.
Does this help any
diff --git a/redhat/bcfg2.spec.in b/redhat/bcfg2.spec.in index 31351b1..e44ff34 100644 --- a/redhat/bcfg2.spec.in +++ b/redhat/bcfg2.spec.in @@ -85,15 +85,15 @@ Configuration management server %setup -q -n %{name}-%{version}-%{release} # fixup some paths -%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' debian/bcfg2.init +%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' redhat/scripts/bcfg2.init %{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' tools/bcfg2-cron %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.daily %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.hourly # don't start servers by default -%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' debian/bcfg2.init -%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' debian/bcfg2-server.init +%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' redhat/scripts/bcfg2.init +%{__perl} -pi -e '[email protected]: (\d+)@chkconfig: [email protected]' redhat/scripts/bcfg2-server.init # get rid of extraneous shebangs for f in `find src/lib -name \*.py`
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 7 Changed 14 years ago by solj
Replying to lueningh:
That seems to be doing the same thing for me...
In that case, maybe we should unify the behavior across distros and have the redhat packages ship with the configuration in /etc/default as well. Does this work?
diff --git a/redhat/bcfg2.spec.in b/redhat/bcfg2.spec.in index 31351b1..67a4bac 100644 --- a/redhat/bcfg2.spec.in +++ b/redhat/bcfg2.spec.in @@ -85,9 +85,6 @@ Configuration management server %setup -q -n %{name}-%{version}-%{release} # fixup some paths -%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' debian/bcfg2.init -%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' tools/bcfg2-cron - %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.daily %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.hourly @@ -113,7 +110,7 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_initrddir} mkdir -p %{buildroot}%{_sysconfdir}/cron.daily mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +mkdir -p %{buildroot}%{_sysconfdir}/default mkdir -p %{buildroot}%{_libexecdir} mkdir -p %{buildroot}%{_var}/lib/bcfg2 mkdir -p %{buildroot}%{_var}/cache/bcfg2 @@ -126,7 +123,7 @@ install -m 755 debian/bcfg2.cron.daily %{buildroot}%{_sysconfdir}/cron.daily/bcf install -m 755 debian/bcfg2.cron.hourly %{buildroot}%{_sysconfdir}/cron.hourly/bcfg2 install -m 755 tools/bcfg2-cron %{buildroot}%{_libexecdir}/bcfg2-cron -install -m 644 debian/bcfg2.default %{buildroot}%{_sysconfdir}/sysconfig/bcfg2 +install -m 644 debian/bcfg2.default %{buildroot}%{_sysconfdir}/default/bcfg2 touch %{buildroot}%{_sysconfdir}/bcfg2.conf touch %{buildroot}%{_sysconfdir}/bcfg2.key @@ -168,7 +165,7 @@ fi %ghost %attr(600,root,root) %config(noreplace) %{_sysconfdir}/bcfg2.conf -%config(noreplace) %{_sysconfdir}/sysconfig/bcfg2 +%config(noreplace) %{_sysconfdir}/default/bcfg2 %{_sysconfdir}/cron.daily/bcfg2 %{_sysconfdir}/cron.hourly/bcfg2
comment:6 Changed 14 years ago by solj
- Owner changed from desai to solj
- Status changed from new to accepted
comment:7 in reply to: ↑ 5 Changed 14 years ago by lueningh
That didn't make any difference either. Looking more closely at the patch, though, I have a new question: I'm building with "rpmbuild -ta bcfg-1.0.0.tar.gz", and I bet that is finding the bcfg2.spec file that exists in the misc/ directory. Is there a "correct" way to recreate the spec file from the spec.in and get it in the right place?
Replying to solj:
Replying to lueningh:
That seems to be doing the same thing for me...
In that case, maybe we should unify the behavior across distros and have the redhat packages ship with the configuration in /etc/default as well. Does this work?
diff --git a/redhat/bcfg2.spec.in b/redhat/bcfg2.spec.in index 31351b1..67a4bac 100644 --- a/redhat/bcfg2.spec.in +++ b/redhat/bcfg2.spec.in @@ -85,9 +85,6 @@ Configuration management server %setup -q -n %{name}-%{version}-%{release} # fixup some paths -%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' debian/bcfg2.init -%{__perl} -pi -e '[email protected]/etc/[email protected]%{_sysconfdir}/[email protected]' tools/bcfg2-cron - %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.daily %{__perl} -pi -e '[email protected]/usr/lib/[email protected]%{_libexecdir}@g' debian/bcfg2.cron.hourly @@ -113,7 +110,7 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_initrddir} mkdir -p %{buildroot}%{_sysconfdir}/cron.daily mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +mkdir -p %{buildroot}%{_sysconfdir}/default mkdir -p %{buildroot}%{_libexecdir} mkdir -p %{buildroot}%{_var}/lib/bcfg2 mkdir -p %{buildroot}%{_var}/cache/bcfg2 @@ -126,7 +123,7 @@ install -m 755 debian/bcfg2.cron.daily %{buildroot}%{_sysconfdir}/cron.daily/bcf install -m 755 debian/bcfg2.cron.hourly %{buildroot}%{_sysconfdir}/cron.hourly/bcfg2 install -m 755 tools/bcfg2-cron %{buildroot}%{_libexecdir}/bcfg2-cron -install -m 644 debian/bcfg2.default %{buildroot}%{_sysconfdir}/sysconfig/bcfg2 +install -m 644 debian/bcfg2.default %{buildroot}%{_sysconfdir}/default/bcfg2 touch %{buildroot}%{_sysconfdir}/bcfg2.conf touch %{buildroot}%{_sysconfdir}/bcfg2.key @@ -168,7 +165,7 @@ fi %ghost %attr(600,root,root) %config(noreplace) %{_sysconfdir}/bcfg2.conf -%config(noreplace) %{_sysconfdir}/sysconfig/bcfg2 +%config(noreplace) %{_sysconfdir}/default/bcfg2 %{_sysconfdir}/cron.daily/bcfg2 %{_sysconfdir}/cron.hourly/bcfg2
comment:8 Changed 14 years ago by desai
- Status changed from accepted to closed
- Resolution set to fixed
Fixed in [1e333e6098de13e937ed7dd36c2423daeb5e27d8] (SVN r5556)
We need to change the message on redhat machines to tell the user to look at /etc/sysconfig instead of /etc/default.