Home | History | Annotate | Download | only in postinst
      1 #!/system/bin/sh
      2 
      3 #
      4 # Copyright (C) 2015 The Android Open Source Project
      5 #
      6 # Licensed under the Apache License, Version 2.0 (the "License");
      7 # you may not use this file except in compliance with the License.
      8 # You may obtain a copy of the License at
      9 #
     10 #      http://www.apache.org/licenses/LICENSE-2.0
     11 #
     12 # Unless required by applicable law or agreed to in writing, software
     13 # distributed under the License is distributed on an "AS IS" BASIS,
     14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15 # See the License for the specific language governing permissions and
     16 # limitations under the License.
     17 #
     18 
     19 # This is an example post-install script. This script will be executed by the
     20 # update_engine right after finishing writing all the partitions, but before
     21 # marking the new slot as active.
     22 #
     23 # This script receives no arguments. argv[0] will include the absolute path to
     24 # the script, including the temporary directory where the new partition was
     25 # mounted.
     26 #
     27 # This script will run in the context of the old kernel and old system. Note
     28 # that the absolute path used in first line of this script (/system/bin/sh) is
     29 # indeed the old system's sh binary. If you use a compiled program, you might
     30 # want to link it statically or use a wrapper script to use the new ldso to run
     31 # your program (see the --generate-wrappers option in lddtree.py for example).
     32 #
     33 # If the exit code of this program is an error code (different from 0), the
     34 # update will fail and the new slot will not be marked as active.
     35 
     36 exit 0
     37