add an error check to the log deletion requiring root privileges; add a "done" msgbox after log is deleted.

This commit is contained in:
chess.griffin 2008-03-29 16:13:38 +00:00
parent 029ef04293
commit a628c076cb

View File

@ -271,12 +271,21 @@ else
dialog --title "Displaying $TMP/sbopkg-build-log" \ dialog --title "Displaying $TMP/sbopkg-build-log" \
--textbox $TMP/sbopkg-build-log 0 0 --textbox $TMP/sbopkg-build-log 0 0
dialog --title "Keep Log?" --yesno "Would you like to keep the \ dialog --title "Keep Log?" --yesno "Would you like to keep the \
permanent build log $TMP/sbopkg-build-log? Select YES to keep or NO permanent build log $TMP/sbopkg-build-log? Select YES to keep or NO \
to delete." 0 0 to delete." 0 0
#2>$TMP/sbopkg_keep_log #2>$TMP/sbopkg_keep_log
if [ $? = 1 ]; then if [ $? = 1 ]; then
rm -rf $TMP/sbopkg-build-log check_root
continue if [ $ROOT = "false" ]; then
dialog --title "ERROR" --msgbox "Sorry, only the root \
user can delete the build log." 0 0
continue
else
rm -rf $TMP/sbopkg-build-log
dialog --title "Done" --msgbox "The build log has been \
deleted." 0 0
continue
fi
else else
continue continue
fi fi