This file is indexed.

/usr/share/dell/scripts/SUCCESS-SCRIPT is in dell-recovery 1.31.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
#!/bin/sh
#
#       <SUCCESS-SCRIPT>
#
#       Called in the event that postinstall (chroot) steps complete successfully
#
#       Copyright 2008-2010 Dell Inc.
#           Mario Limonciello <Mario_Limonciello@Dell.com>
#           Hatim Amro <Hatim_Amro@Dell.com>
#           Michael E Brown <Michael_E_Brown@Dell.com>
#
#       This program is free software; you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation; either version 2 of the License, or
#       (at your option) any later version.
#
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.

# BE AWARE THAT THIS SCRIPT IS CALLED FROM OUTSIDE THE CHROOT.
# The OS is mounted under $TARGET

. /usr/share/dell/scripts/fifuncs "target"

set -x
set -e

IFHALT "(SUCCESS) Clean-Up .."

#Record a list of all installed packages from post-phase to prevent ubiquity removing them.
if [ -f "$TARGET/var/lib/ubiquity/installed-packages" ]; then
    chroot $TARGET dpkg --get-selections | grep -v ubiquity | awk '{print $1}' > \
           $TARGET/var/lib/ubiquity/installed-packages
fi
#Fixup APT how we want it for a successful oem-config run
rm -f $TARGET/var/lib/apt/lists/*Packages
rm -f $TARGET/etc/apt/sources.list.d/dell.list
#https://bugs.launchpad.net/ubuntu/+source/choose-mirror/+bug/550694
sed -i "s/http:\/\/.*.archive.ubuntu.com/http:\/\/archive.ubuntu.com/" $TARGET/etc/apt/sources.list

if [ "$BOOTDEV" = "$TARGETDEV" ]; then
    if [ -d "/isodevice" ]; then
        RP="/isodevice"
    else
        RP="/cdrom"
    fi
    mount -o remount,rw $RP

    IFHALT "Resetting grub fail state"
    mkdir -p $RP/factory
    grub-editenv $RP/factory/grubenv unset recordfail
    grub-editenv $RP/factory/grubenv unset install_in_progress
    grub-editenv $RP/factory/grubenv set install_finished=1

    #Set the right partition active and restore MBR
    /tmp/set_bootable

    IFHALT "Clean up FI Env..."
    rm -rf $RP/scripts/chroot-scripts/os-post/95-set_UTC_TZ.sh
    rm -rf $RP/misc/dell-unsupported.py
    rm -rf $RP/misc/run-tz-fix
    rm -rf $RP/misc/tz_offset.py
    rm -rf $RP/misc/drmk.zip
    rm -rf $RP/command.com
    rm -rf $RP/autoexec.bat
    rm -rf $RP/dellbio.bin
    rm -rf $RP/dellrmk.bin
    rm -rf $RP/linld.com
    rm -rf $RP/cmd.cfg
    rm -rf $RP/up.zip
    rm -rf $RP/up.tgz
    rm -rf $RP/upimg.bin
    rm -rf $RP/upimg.gz
    rm -rf $RP/SDR
    rm -rf $RP/*.SDR
    rm -rf $RP/srv
    rm -rf $RP/factory/*.dll
    rm -rf $RP/factory/*.exe
    rm -rf $RP/factory/*.bat
    rm -rf $RP/.disk/casper-uuid*

    IFHALT "Report the LOG..."
    if [ -f /dell/fist/tal ]; then
        cp $TARGET/$LOG/chroot.sh.log /tmp/fist.log
        /dell/fist/tal PutFiles /tmp/fist.log
        rm -rf /cdrom/debs/fist
    fi

    #If we have another script to run, do it
    if [ -f $RP/scripts/chroot-scripts/SUCCESS-SCRIPT ]; then
        $RP/scripts/chroot-scripts/SUCCESS-SCRIPT
        rm -f $RP/scripts/chroot-scripts/SUCCESS-SCRIPT
        rm -f $RP/scripts/chroot-scripts/FAIL-SCRIPT
        IFHALT "(SUCCESS) Report to logs.. Done!"
    fi

fi

IFHALT "(SUCCESS) Clean-Up .. Done!"