summaryrefslogtreecommitdiff
path: root/rootdir/system/bin
diff options
context:
space:
mode:
authorAlexander Diewald <Diewi@diewald-net.com>2017-11-28 15:49:49 +0100
committerArian <arian.kulmer@web.de>2019-10-07 11:11:29 +0200
commit281e1c378aaa1b7197051f9a1e4f0d75b60dcac8 (patch)
treee03d943450732f3da5b26939afc30593a2d97e0c /rootdir/system/bin
parent154011abb8b0e9cc67c5f0620f18e080f3ae983e (diff)
shinano: Move shell scripts to system/vendor.
* Scripts use the /system/vendor/bin/sh shebang now. * Move shell scripts from system/etc to vendor/system/bin. * Adjust init files. Change-Id: Ib0b9eb59305425b415e2681e7943f9ebfa6480d4 Signed-off-by: Alexander Diewald <Diewi@diewald-net.com> Signed-off-by: Arian <arian.kulmer@web.de>
Diffstat (limited to 'rootdir/system/bin')
-rwxr-xr-xrootdir/system/bin/credmgrfirstboot.sh55
1 files changed, 0 insertions, 55 deletions
diff --git a/rootdir/system/bin/credmgrfirstboot.sh b/rootdir/system/bin/credmgrfirstboot.sh
deleted file mode 100755
index 36e0c08..0000000
--- a/rootdir/system/bin/credmgrfirstboot.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/system/bin/sh
-CREDFOLDER=/data/credmgr
-LOG=/cache/credmgr.log
-
-# start new log file
-echo -e "\n*********************************\n$(date) - $0 started" > $LOG
-
-# simple error function writing to kernel buffer and logfile
-F_ERR(){
- ERR="$1"
- MSG="$2"
- if [ $ERR -ne 0 ];then
- echo "CREDINIT: $MSG failed!" >> $LOG
- exit $ERR
- else
- echo "CREDINIT: $MSG finished successfully" >> $LOG
- fi
-}
-
-# If credmgrd data doesn't match our
-CREDMGRCNT=$(find $CREDFOLDER -group system -type f -name "credmgr.db" | wc -l )
-
-echo -e "credmgr folder:\n$(ls -la $CREDFOLDER)\ncredmgr match (if any):" >> $LOG
-find $CREDFOLDER -group system -type f -name "credmgr.db" >> $LOG
-
-
-if [ "x$CREDMGRCNT" == "x0" ]; then
- # If /data/credmgr exist remove it
- echo "CREDINIT: Dont match"
- if [ -d "$CREDFOLDER" ]; then
- echo "CREDINIT: Drop old credmgrdata"
- mv -vf $CREDFOLDER ${CREDFOLDER}.$(date +"%Y-%m-%d") >> $LOG 2>&1
- fi
- # Put binary into /cache
- mkdir $CREDFOLDER >> $LOG 2>&1
- F_ERR $? "mkdir $CREDFOLDER"
- # Set perms on folder
- chown system:system $CREDFOLDER >> $LOG 2>&1
- F_ERR $? "chown $CREDFOLDER"
- chmod 770 $CREDFOLDER >> $LOG 2>&1
- F_ERR $? "chmod 770"
- chcon u:object_r:credmgrd_data_file:s0 $CREDFOLDER >> $LOG 2>&1
- F_ERR $? "chcon $CREDFOLDER"
- echo "CREDINIT: cp initial file" >> $LOG 2>&1
- cp -v /system/vendor/CredentialManagerData /cache/CredentialManagerData >> $LOG 2>&1
- F_ERR $? "copy CredentialManagerData"
- chown system:system /cache/CredentialManagerData >> $LOG 2>&1
- F_ERR $? "chown CredentialManagerData"
-else
- F_ERR 0 "credmgr found already. no preparation required."
-fi
-
-# Tell init we are ready
-setprop sys.credmgrdready true
-F_ERR $? "setting property"