Obtain TZ_BUILD_DATE in the same manner from OBS and QuickBuild
[platform/upstream/meta-generic.git] / scripts / generic-base.post
index cfd5f93..d3a1bd6 100644 (file)
@@ -6,18 +6,14 @@ test -d /var && cp -arf /var/* /opt/var/
 rm -rf /var
 ln -snf opt/var /var
 
-test ! -e /opt/home && mkdir -p /opt/home
-test -d /home && cp -arf /home/* /opt/home/
+test ! -e /opt/usr/home && mkdir -p /opt/usr/home
+test -d /home && cp -arf /home/* /opt/usr/home/
 rm -rf /home
-ln -snf opt/home /home
-
-test ! -e /opt/etc/smack && mkdir -p /opt/etc/smack
-test -d /etc/smack && cp -arf /etc/smack/* /opt/etc/smack/
-rm -rf /etc/smack
-ln -snf ../opt/etc/smack /etc/smack
+ln -snf opt/usr/home /home
 
 build_ts=$(date -u +%s)
-build_date=$(date -u --date @$build_ts +%Y%m%d_%H%M%S)
+build_date_local=$(date -u --date @$build_ts +%Y%m%d_%H%M%S)
+build_date=$(echo @BUILD_DATE@ | sed -r -e "s/@BUILD_DATE[@]/$build_date_local/g")
 build_time=$(date -u --date @$build_ts +%H:%M:%S)
 
 sed -ri \
@@ -34,9 +30,6 @@ Description=User session default target
 EOF
 mkdir -p /usr/lib/systemd/user/default.target.wants
 
-# start dbus session
-ln -s ../dbus.service /lib/systemd/user/default.target.wants/
-
 # sdx: fix smack labels on /var/log
 chsmack -a '*' /var/log