Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 6sep10 shinobar: installing files under /mnt is danger #LN# 82-117 of /usr/local/petget/installpkg.sh (tahrpup) - http://www.pearltrees.com/s243a/installpkg-sh-usr-local-petget/id20402080/item224090338
- install_path_check() {
- FILELIST="/root/.packages/${DLPKG_NAME}.files"
- [ -s "$FILELIST" ] || return 0 #120126 noryb009: typo
- grep -q '^/mnt' "$FILELIST" || return 0
- MNTDIRS=$(cat "$FILELIST" | grep '^/mnt/.*/$' | cut -d'/' -f1-3 | tail -n 1)
- LANG=$LANG_USER
- MSG1=$(gettext "This package will install files under")
- MSG2=$(gettext "It can be dangerous to install files under '/mnt' because it depends on the profile of installation.")
- MSG3=""
- if grep -q '^/mnt/home' "$FILELIST"; then
- if [ $PUPMODE -eq 5 ]; then
- MSG3=$(gettext "You are running Puppy without 'pupsave', and '/mnt/home' does not exist. In this case, you can use the RAM for this space, but strongly recommended to shutdown now to create 'pupsave' BEFORE installing these packages.")
- MSG3="$MSG3\\n$(gettext "NOTE: You can install this package for a tentative use, then do NOT make 'pupsave' with this package installed.")"
- fi
- DIRECTSAVEPATH=""
- fi
- # dialog
- export DIALOG="<window title=\"$T_title\" icon-name=\"gtk-dialog-warning\">
- <vbox>
- <text use-markup=\"true\"><label>\"$MSG1: <b>$MNTDIRS</b>\"</label></text>
- <text><input>echo -en \"$MSG2 $MSG3\"</input></text>
- <text><label>$(gettext "Click 'Cancel' not to install(recommended). Or click 'Install' if you like to proceed.")</label></text>
- <hbox>
- <button cancel></button>
- <button><input file stock=\"gtk-apply\"></input><label>$(gettext 'Install')</label><action type=\"exit\">INSTALL</action></button>
- </hbox>
- </vbox>
- </window>"
- RETPARAMS=`gtkdialog -p DIALOG` || echo "$DIALOG" >&2
- eval "$RETPARAMS"
- LANG=C
- [ "$EXIT" = "INSTALL" ] && return 0
- rm -f "$FILELIST"
- exit 1
- }
Advertisement
Add Comment
Please, Sign In to add comment