Commit 2a1907ef authored by Vivien Alger's avatar Vivien Alger

Ugly hack to try to make OpenSuse build

parent 207bfcf8
...@@ -42,22 +42,9 @@ function spec_generation ...@@ -42,22 +42,9 @@ function spec_generation
# Replace version/release/etc… informations in base spec file # Replace version/release/etc… informations in base spec file
sed $VERSION_REGEX $RPM_DIRECTORY/slapos.spec.base.in > $SLAPOS_SPEC sed $VERSION_REGEX $RPM_DIRECTORY/slapos.spec.base.in > $SLAPOS_SPEC
# Post scriplet generation # Scriplet insertion
echo "%post" >> $SLAPOS_SPEC
cat $RE6STNET_SCRIPT >> $SLAPOS_SPEC cat $RE6STNET_SCRIPT >> $SLAPOS_SPEC
cat $RPM_DIRECTORY/post.sh >> $SLAPOS_SPEC cat $RPM_DIRECTORY/slapos.spec.end.in >> $SLAPOS_SPEC
# Preun scriplet generation
echo "
%preun" >> $SLAPOS_SPEC
cat $RPM_DIRECTORY/preun.sh >> $SLAPOS_SPEC
# Postun scriplet generation
echo "
%postun" >> $SLAPOS_SPEC
cat $RPM_DIRECTORY/postun.sh >> $SLAPOS_SPEC
echo "
" >> $SLAPOS_SPEC
} }
function prepare_deb_packaging function prepare_deb_packaging
......
...@@ -93,3 +93,5 @@ mkdir -p $RPM_BUILD_ROOT/opt/slapos/log ...@@ -93,3 +93,5 @@ mkdir -p $RPM_BUILD_ROOT/opt/slapos/log
%files %files
/ /
%defattr(-,root,root) %defattr(-,root,root)
%post
echo """To generate slapos configuration run '#slapos node register'"""
if [ -f /bin/systemctl ]; then
systemctl enable slapos-node.service
systemctl start slapos-node.service
fi
%preun
if [ -f /bin/systemctl ]; then
systemctl stop slapos-node.service
fi
%postun
if [ -f /bin/systemctl ]; then
systemctl restart slapos-node.service
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment