|
Bugzilla – Full Text Bug Listing |
| Summary: | yast installer doesn't install its own systemd .service file | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Frederic Crozat <fcrozat> |
| Component: | Installation | Assignee: | Jiří Suchomel <jsuchome> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Major | ||
| Priority: | P5 - None | ||
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Bug Depends on: | |||
| Bug Blocks: | 696902 | ||
| Attachments: |
second stage service
firstboot service suseconfig service |
||
Created attachment 447212 [details]
firstboot service
Created attachment 447213 [details]
suseconfig service
(In reply to comment #0) > Created an attachment (id=447211) [details] > second stage service > > to have working second phase when booting with systemd, yast2-installation > package should ship its own systemd .service files. > > I've created such files, based on what is happening in /etc/init.d/boot > -YaST2-Second-Phase.service > -YaST2-Firstboot.service > Where should it be installed? How other packages package thise service files? Sorry, forgot this part :
specfile should have the following ;
%if 0%{suse_version} > 1210
BuildRequires: systemd-devel
%{systemd_requires}
%endif
#install the files in %_unitdir (ie /lib/systemd/system )
install -m644 file.service $RPM_BUILD_ROOT%_unitdir
and add to scripts :
%post
%service_add YaST2-Second-Phrase.service Yast2-Firstboot.service
/bin/systemctl enable YaST2-Second-Phrase.service Yast2-Firstboot.service > /dev/null 2>&1 || :
%preun
if [ $1 -eq 0 ]; then
/bin/systemctl disable YaST2-Second-Phrase.service Yast2-Firstboot.service > /dev/null 2>&1 || :
fi
%service_del_preun YaST2-Second-Phrase.service Yast2-Firstboot.service
%postun
%service_del_postun YaST2-Second-Phrase.service Yast2-Firstboot.service
The postinstall script fails for me, I do not know why; do you have an idea? I've probably done something wrong to my spec file: https://build.suse.de/package/show?package=yast2-installation&project=home%3Ajsuchome OK, solved by mail. Thanks for help. New package is yast2-installation-2.21.15 This is an autogenerated message for OBS integration: This bug (713760) was mentioned in https://build.opensuse.org/request/show/80220 Factory / yast2-installation |
Created attachment 447211 [details] second stage service to have working second phase when booting with systemd, yast2-installation package should ship its own systemd .service files. I've created such files, based on what is happening in /etc/init.d/boot -YaST2-Second-Phase.service -YaST2-Firstboot.service I've also created SuSEconfig.service but I'm not sure if it is still needed : on my test, /var/lib/YaST2/run_suseconfig was empty on a sysvinit install). If it is, the Yast2 output redirect should be done in a shell wrapper and this wrapper should be called in YaST2-* service files.