Files
agnos-builder/userspace/root/etc/initscripts/sfs_config
Adeeb Shihadeh fe3c65b79f unpack the debs (#562)
* unpack the debs

* update rest

* ignore
2026-04-30 12:54:27 -07:00

51 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
#==============================================================================
# FILE: sfs_config
#
# DESCRIPTION:
# create files and give permissions to the files and directories needed by
# secure file system
#
# Copyright (c) 2017 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#==============================================================================
set -e
soc_id=`cat /sys/devices/soc0/soc_id`
if [[ "$soc_id" -ne "290" && "$soc_id" -ne "296" && "$soc_id" -ne "297" && "$soc_id" -ne "298" && "$soc_id" -ne "299" ]]; then
if [ "$soc_id" -eq "341" ]; then
if [[ -e /data/persist && ! -e /persist ]]; then
ln -sf /data/persist /persist
fi
fi
if [ -e /persist ]; then
if [ ! -d /persist/data ]; then
echo "Creating /persist/data"
mkdir /persist/data
fi
chmod o+rwx /persist/data
fi
if [ ! -d /data/misc ]; then
echo "Creating /data/misc"
mkdir /data/misc
fi
chmod o+rwx /data/misc
if [ ! -d /persist/tzstorage ]; then
echo "Creating /persist/tzstorage"
mkdir -p /persist/tzstorage
fi
chmod o+rwx /persist/tzstorage
if [ ! -L /data/vendor/tzstorage ]; then
echo "Creating /data/vendor/tzstorage"
mkdir -p /data/vendor/
ln -s /persist/tzstorage /data/vendor/tzstorage
fi
echo "SFS configuration completed."
fi
exit 0