You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
613 B
21 lines
613 B
#!/bin/sh |
|
|
|
POSTUPGRADE_DIR="/root/preupgrade/postupgrade.d" |
|
|
|
echo "Running postupgrade scripts..." |
|
|
|
if [ -d "${NEWROOT}/${POSTUPGRADE_DIR}" ]; then |
|
( cd $NEWROOT ; |
|
|
|
find "./${POSTUPGRADE_DIR}" -type f -perm /u+x -exec ls -1 {} + | \ |
|
while read -r script ; do |
|
echo "Running ${script##./}..." |
|
scriptdir="$(echo "${script}" | sed 's|^\(.*\)/\([^/]*\)$|\1|')" |
|
scriptbase="$(echo "${script}" | sed 's|^\(.*\)/\([^/]*\)$|\2|')" |
|
chroot . /bin/sh -c "cd \"${scriptdir}\" && ./\"${scriptbase}\"" |
|
done |
|
) |
|
else |
|
echo "No postupgrade scripts found." |
|
fi |
|
|
|
|