################ common-base.post ################## # setup systemd default target for user session cat <<'EOF' >>/lib/systemd/user/default.target [Unit] Description=User session default target EOF mkdir -p /lib/systemd/user/default.target.wants # start dbus session ln -s ../dbus.service /lib/systemd/user/default.target.wants/ # Run prelink to speed up dynamic binary/library loading /usr/sbin/prelink --all ln -sf /proc/self/mounts /etc/mtab # fix TIVI-2291 sed -ri "s/(^blacklist i8042.*$)/#fix from base-general.post \1/" /etc/modprobe.d/blacklist.conf # sdx: fix smack labels on /var/log chsmack -a '*' /var/log # Temporary work around for bug in filesystem package resulting in the 'app' user home # directory being only readable by root chown -R app:app /opt/home/app # Since weston-launch runs with the "User" label, the app # home dir must have the same label chsmack -a User /opt/home/app # bug workaround on MIC (DEVT-160) if [ -e /etc/sysconfig/i18n -a ! -e /etc/locale.conf ]; then unset LANG unset LC_CTYPE unset LC_NUMERIC unset LC_TIME unset LC_COLLATE unset LC_MONETARY unset LC_MESSAGES unset LC_PAPER unset LC_NAME unset LC_ADDRESS unset LC_TELEPHONE unset LC_MEASUREMENT unset LC_IDENTIFICATION . /etc/sysconfig/i18n rm -f /etc/sysconfig/i18n [ -n "$LANG" ] && echo LANG=$LANG > /etc/locale.conf [ -n "$LC_CTYPE" ] && echo LC_CTYPE=$LC_CTYPE >> /etc/locale.conf [ -n "$LC_NUMERIC" ] && echo LC_NUMERIC=$LC_NUMERIC >> /etc/locale.conf [ -n "$LC_TIME" ] && echo LC_TIME=$LC_TIME >> /etc/locale.conf [ -n "$LC_COLLATE" ] && echo LC_COLLATE=$LC_COLLATE >> /etc/locale.conf [ -n "$LC_MONETARY" ] && echo LC_MONETARY=$LC_MONETARY >> /etc/locale.conf [ -n "$LC_MESSAGES" ] && echo LC_MESSAGES=$LC_MESSAGES >> /etc/locale.conf [ -n "$LC_PAPER" ] && echo LC_PAPER=$LC_PAPER >> /etc/locale.conf [ -n "$LC_NAME" ] && echo LC_NAME=$LC_NAME >> /etc/locale.conf [ -n "$LC_ADDRESS" ] && echo LC_ADDRESS=$LC_ADDRESS >> /etc/locale.conf [ -n "$LC_TELEPHONE" ] && echo LC_TELEPHONE=$LC_TELEPHONE >> /etc/locale.conf [ -n "$LC_MEASUREMENT" ] && echo LC_MEASUREMENT=$LC_MEASUREMENT >> /etc/locale.conf [ -n "$LC_IDENTIFICATION" ] && echo LC_IDENTIFICATION=$LC_IDENTIFICATION >> /etc/locale.conf fi # workaround for bug PTREL-763 patch -b -p1 -d/ <<'EOF' --- bad/etc/pam.d/systemd-user 2014-03-20 10:01:36.657843073 +0100 +++ good/etc/pam.d/systemd-user 2014-03-20 10:06:51.586121696 +0100 @@ -4,5 +4,6 @@ account include system-auth session include system-auth +session required pam_systemd.so auth required pam_deny.so password required pam_deny.so EOF # extra fix to avoid root and display sessions patch -b -p1 -d/ <<'EOF' --- bad/etc/pam.d/system-auth 2014-04-07 06:16:51.888018876 -0700 +++ good/etc/pam.d/system-auth 2014-04-07 06:16:46.335018503 -0700 @@ -11,7 +11,6 @@ password required pam_deny.so session optional pam_keyinit.so revoke -session optional pam_systemd.so session required pam_limits.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so EOF ######### multiuser mode: create additional users tizen_crypted_pass=$(perl -e 'print crypt("tizen", "aa")') uid=5001 for user in alice bob carol; do useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user uid=$(( $uid + 1 )) done # create appfw dirs inside homes for user in alice bob carol app guest; do for appdir in desktop manifest dbspace; do mkdir -p /home/$user/.applications/$appdir done find /home/$user/ -type d -exec chsmack -a User {} \; chown -R $user:users /home/$user/ done # adjust app group: main group 'users', extra group 'app' usermod -g users app usermod -G app app