summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarlandrover.com>2015-06-30 12:17:34 -0700
committerMagnus Feuer <mfeuer@jaguarlandrover.com>2015-06-30 12:17:34 -0700
commit04b7a59b1c80650890bec4dccd66e986576b9152 (patch)
treec56bb55c605bd0e7f183dc0ec907bc2375ffd564
parentcaae02c2328b3777cdebfe183f4b3dcb263faa06 (diff)
downloadrvi_core-04b7a59b1c80650890bec4dccd66e986576b9152.tar.gz
release-next: Fixed VIN file setup
-rwxr-xr-xpackaging/rvi.spec20
1 files changed, 3 insertions, 17 deletions
diff --git a/packaging/rvi.spec b/packaging/rvi.spec
index f24b9eb..e1bac72 100755
--- a/packaging/rvi.spec
+++ b/packaging/rvi.spec
@@ -37,25 +37,10 @@ mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants/
install ./scripts/rvi.service $RPM_BUILD_ROOT/usr/lib/systemd/system/rvi.service
ln -fsr $RPM_BUILD_ROOT/usr/lib/systemd/system/rvi.service \
$RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants/rvi.service
-
ln -fsr $RPM_BUILD_ROOT/opt/rvi-$RPM_PACKAGE_VERSION/releases/$RPM_PACKAGE_VERSION/sys.config \
$RPM_BUILD_ROOT/opt/rvi-$RPM_PACKAGE_VERSION/sys.config
-
-%post
-if [ ! -f /home/app/content/Documents/vin ]
-then
- uuidgen > /home/app/content/Documents/vin
- chown app.users /home/app/content/Documents/vin
- echo "VIN created in /home/app/content/Documents/vin:"
- echo " $(cat /home/app/content/Documents/vin)"
-
-else
- echo "Will not touch existing VIN in /home/app/content/Documents/vin:"
- echo " $(cat /home/app/content/Documents/vin)"
-fi
-/usr/bin/systemctl daemon-reload
-
-%postun
+mkdir -p $RPM_BUILD_ROOT/home/app/content/Documents
+echo "default_vin" > $RPM_BUILD_ROOT/home/app/content/Documents/vin
%clean
rm -rf $RPM_BUILD_ROOT
@@ -63,6 +48,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%manifest packaging/rvi.manifest
%defattr(-,root,root)
+%attr(644,app,users) /home/app/content/Documents/vin
/usr/lib/systemd/system/rvi.service
/etc/systemd/system/multi-user.target.wants/rvi.service
/opt/rvi-0.4.0