2015-07-17 23:15:38 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-02-03 01:27:06 +03:00
|
|
|
# Check for fresh install and run oddball system post install stuff that the
|
|
|
|
# package_daemon doesn't handle. All Home and other post install scripts
|
|
|
|
# get run the old way here (probably won't be any, unless you reinstalled?).
|
2015-07-17 23:15:38 +03:00
|
|
|
|
2015-10-19 22:09:55 +03:00
|
|
|
title=$1
|
|
|
|
freshInstallIndicator=$2
|
|
|
|
postInstallDir=$3
|
2015-07-17 23:15:38 +03:00
|
|
|
|
2015-10-19 22:09:55 +03:00
|
|
|
if [ -e $freshInstallIndicator ]; then
|
2015-07-17 23:15:38 +03:00
|
|
|
# execute scripts
|
2021-02-03 01:27:06 +03:00
|
|
|
|
|
|
|
if [ "$postInstallDir" == "/boot/system/boot/post-install" ]; then
|
|
|
|
# Special case for one script file that isn't in a package. Rest
|
|
|
|
# of the files in there will be run by package_daemon when
|
|
|
|
# doing first boot processing. Can be removed when Gerrit
|
|
|
|
# Change #3751 is done.
|
|
|
|
specialCaseFile="$postInstallDir/add_catalog_entry_attributes.sh"
|
|
|
|
if [ -e "$specialCaseFile" ]; then
|
|
|
|
echo "Running $title special case $specialCaseFile first boot processing." > /dev/dprintf
|
|
|
|
"$specialCaseFile"
|
|
|
|
else
|
|
|
|
echo "Skipping $title obsolete first boot processing, files:" > /dev/dprintf
|
|
|
|
ls "$postInstallDir" > /dev/dprintf
|
2015-07-17 23:15:38 +03:00
|
|
|
fi
|
2021-02-03 01:27:06 +03:00
|
|
|
else
|
|
|
|
for f in $postInstallDir/*.sh
|
|
|
|
do
|
|
|
|
if [ -f $f ]; then
|
|
|
|
echo "Running $title script $f ..." > /dev/dprintf
|
|
|
|
$f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
2015-07-17 23:15:38 +03:00
|
|
|
|
|
|
|
sync
|
|
|
|
rm $freshInstallIndicator
|
|
|
|
fi
|