From 281e1c378aaa1b7197051f9a1e4f0d75b60dcac8 Mon Sep 17 00:00:00 2001 From: Alexander Diewald Date: Tue, 28 Nov 2017 15:49:49 +0100 Subject: 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 Signed-off-by: Arian --- rootdir/system/bin/credmgrfirstboot.sh | 55 ---------------------------------- 1 file changed, 55 deletions(-) delete mode 100755 rootdir/system/bin/credmgrfirstboot.sh (limited to 'rootdir/system/bin') 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" -- cgit v1.2.3