summaryrefslogtreecommitdiff
path: root/source/ap/slackpkg/files/post-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/slackpkg/files/post-functions.sh')
-rw-r--r--source/ap/slackpkg/files/post-functions.sh47
1 files changed, 34 insertions, 13 deletions
diff --git a/source/ap/slackpkg/files/post-functions.sh b/source/ap/slackpkg/files/post-functions.sh
index c286e7af..b5fecd39 100644
--- a/source/ap/slackpkg/files/post-functions.sh
+++ b/source/ap/slackpkg/files/post-functions.sh
@@ -111,6 +111,18 @@ removeold() {
rm $i
}
+runvimdiff() {
+ BASENAME=$(basename $i .new)
+ FILEPATH=$(dirname $i)
+ FULLNAME="${FILEPATH}/${BASENAME}"
+
+ if [ -e ${FULLNAME} ]; then
+ vimdiff ${FULLNAME} ${FULLNAME}.new
+ else
+ echo "file $FULLNAME doesn't exist"
+ fi
+}
+
looknew() {
# with ONLY_NEW_DOTNEW set, slackpkg will search only for
@@ -122,12 +134,12 @@ looknew() {
fi
echo -e "\nSearching for NEW configuration files"
- FILES=$(find /etc /var/yp /usr/share/vim -name "*.new" ${ONLY_NEW_DOTNEW} \
+ FILES=$(find ${ROOT}/etc ${ROOT}/var/yp ${ROOT}/usr/share/vim -name "*.new" ${ONLY_NEW_DOTNEW} \
-not -name "rc.inet1.conf.new" \
-not -name "group.new" \
-not -name "passwd.new" \
-not -name "shadow.new" \
- -not -name "gshadow.new" 2>/dev/null)
+ -not -name "gshadow.new" 2>/dev/null | sort 2>/dev/null)
if [ "$FILES" != "" ]; then
echo -e "\n\
Some packages had new configuration files installed.
@@ -166,7 +178,7 @@ What do you want (K/O/R/P)?"
GOEX=0
while [ $GOEX -eq 0 ]; do
echo
- showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge"
+ showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge" "(V)imdiff"
read ANSWER
case $ANSWER in
O|o)
@@ -183,6 +195,9 @@ What do you want (K/O/R/P)?"
M|m)
mergenew $1
;;
+ V|v)
+ runvimdiff $1
+ ;;
K|k|*)
GOEX=1
;;
@@ -203,19 +218,25 @@ What do you want (K/O/R/P)?"
lookkernel() {
NEWKERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
if [ "$KERNELMD5" != "$NEWKERNELMD5" ]; then
- if [ -x /sbin/lilo ]; then
+ if [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] && grep -q initrd /etc/lilo.conf ; then
+ echo -e "\n
+Your kernel image was updated, and your /etc/lilo.conf indicates
+the use of an initrd for at least one of your kernels. Be sure to
+regenerate the initrd for the new kernel and handle any needed
+updates to your bootloader.
+"
+ elif [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] ; then
echo -e "\n
-Your kernel image was updated. We highly recommend you run: lilo
-Do you want slackpkg to run lilo now? (Y/n)"
- answer
- if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
- /sbin/lilo
- fi
+Your kernel image was updated. Be sure to handle any needed updates
+to your bootloader (possibly as simple as running /sbin/lilo).
+"
else
echo -e "\n
-Your kernel image was updated and lilo is not found on your system.
-You may need to adjust your boot manager (like GRUB) to boot appropriate
-kernel."
+Your kernel image was updated, and lilo does not appear to be used on
+your system. You may need to adjust your boot manager (like GRUB) to
+boot the appropriate kernel (after generating an initrd if required)."
fi
+ echo -e "Press any key to continue...\n "
+ read _junk
fi
}