Skip to Content

最新评论

  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • warning: Creating default object from empty value in /var/www/www.minilinux.net/htdocs/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 32.
  • 匿名用户   16 年 15 周   回复
    新的AppRun
    #!/bin/sh
    #(c) Copyright 2008 Barry Kauler, puppylinux.com
    #2008 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
    #/sbin/pup_eventd creates a desktop icon and copy of this script for each drive, ex:
    # for drive sda: cp -a /usr/local/bin/drive_all /root/.pup_event/drive_sda/AppRun
    #this script is launched by pup_eventd when the icon is first created. also,
    #this script is launched when user clicks on deskop icon (former is configurable,
    # see /usr/sbin/eventmanager.
    #passed param is category of drive: card, floppy, optical, usbdrv, drive.
    #v4.0.2 jun08: first write of this script, expanding 'pup_eventd' management.
    #v403 icon menu, can call with 'unmount', 'eventmanager' and 'pmount_<DRV_CATEGORY>' params.
    . /usr/bin/localization
    FSTYPE=""
    [ $2 ] && FSTYPE="$2" #see pup_eventd

    #extract drive name from end of the script name...
    #note, when click on desktop icon, /root/.pup_event/drive_<ONEDRVNAME> is executed,
    #however a script may run /root/.pup_event/drive_<ONEDRVNAME>/AppRun ...
    ONEDRVNAME="`echo "${0}" | sed -e 's%/AppRun%%' | rev | cut -f 1 -d '_' | rev`"

    if [ "`echo "${1}" | grep 'pmount_'`" != "" ];then #v403 chose pmount from drive icon menu.
    DRV_CATEGORY="`echo -n "${1}" | cut -f 2 -d '_'`"
    if [ "`pidof gtkdialog_pmount`" != "" ];then #if pmount running, kill it.
    killall gtkdialog_pmount 2>/dev/null
    sleep 0.1
    fi
    exec pmount ${DRV_CATEGORY}
    fi

    if [ "$1" = "eventmanager" ];then #v403 chosen from drive icon menu.
    #v405 'desktop' param, cutdown tabs for desktop drive icons only...
    exec eventmanager desktop
    fi

    if [ "$1" = "unmount" ];then #v403 chose unmount from drive icon menu.
    mPATTERN='^/dev/'"$ONEDRVNAME"' '
    #MNTPT="`mount | grep "$mPATTERN" | cut -f 3 -d ' '`"
    MNTPT="`df | grep "$mPATTERN" | tr -s ' ' | cut -f 6 -d ' '`"
    [ "$MNTPT" = "" ] && exit #precaution.
    if [ "$MNTPT" = "/" -o "`echo "$MNTPT" | grep '/initrd/'`" != "" ];then
    xmessage -bg "#ff8080" -title "$(eval_gettext "Puppy drive manager")" -center "$(eval_gettext "/dev/\${ONEDRVNAME} mounted on \${MNTPT}
    is in use by Puppy. You cannot unmount it.")"
    exit
    fi
    rox -D $MNTPT
    sync
    while [ 1 ];do
    umount $MNTPT ; umVAL=$?
    #fix zombie process prevents partition unmount, invisible to fuser...
    if [ $umVAL -ne 0 ];then
    ZOMBIES="`ps -H -A | grep '<defunct>' | sed -e 's/ /|/g' | grep -v '|||' | cut -f 1 -d ' ' | tr '\n' ' '`"
    for ONEZOMBIE in $ZOMBIES
    do
    echo "$(eval_gettext "Killing parentless zombie process \$ONEZOMBIE")"
    kill $ONEZOMBIE
    done
    umount $MNTPT ; umVAL=$?
    fi
    #rare ocassion, partition got unmounted before umount runs above...
    umPATTERN="${MNTPT} "
    [ "`busybox mount | grep "$umPATTERN"`" = "" ] && umVAL=0
    if [ $umVAL -ne 0 ];then
    EXTRAMSG0="`fuser -v -m $MNTPT`"
    if [ "$EXTRAMSG0" = "" ];then
    xmessage -bg "#ff8080" -title "$(eval_gettext "Puppy drive manager: ERROR")" -center "$(eval_gettext "FAILURE! In the case of removable media, the most
    common reason is the media is not currently inserted.
    If so, please remedy.")"
    else
    xmessage -bg "#ff00ff" -title "KILL, KILL..." -center -buttons KILL:10,EXIT:20 "$(eval_gettext "FAILURE! One or more processes (programs) are currently
    using /dev/\${ONEDRVNAME}. Here they are:
    \$EXTRAMSG0

    If you press the \"KILL\" button, Puppy will attempt to
    kill the offending programs for you. Only do this as a
    last resort. Firstly you should try to close the programs
    manually, so do not press \"KILL\".
    PLEASE PRESS THE \"EXIT\" BUTTON!")"
    if [ $? -eq 10 ];then
    fuser -k -m $MNTPT
    continue
    fi
    fi
    else
    [ "$ONEDRVAME" = "sr0" -o "$ONEDRVAME" = "sr1" ] && eject /dev/$ONEDRVNAME
    fi
    break
    done
    exit
    fi

    DRV_CATEGORY="${1}"
    [ "$DRV_CATEGORY" = "" ] && DRV_CATEGORY="drive" #precaution.
    [ "$DRV_CATEGORY" = "all" ] && DRV_CATEGORY="drive" #precaution.

    [ -f /etc/eventmanager ] && . /etc/eventmanager #written by /usr/sbin/eventmanager
    [ "$ICONDESK" != "true" -a "$ICONDESK" != "false" ] && ICONDESK="true"
    [ ! $RAMSAVEINTERVAL ] && RAMSAVEINTERVAL=30
    [ "$HOTPLUGNOISY" != "true" -a "$HOTPLUGNOISY" != "false" ] && HOTPLUGNOISY="false"
    [ "$AUTOTARGET" != "true" -a "$AUTOTARGET" != "false" ] && AUTOTARGET="true"
    [ "$ICONPARTITIONS" != "true" -a "$ICONPARTITIONS" != "false" ] && ICONPARTITIONS="true"

    #if ICONDESK=false (see /etc/eventmanager and /sbin/pup_eventd) then there will only
    #be one icon on the desktop, labelled 'drives' and handler script is /usr/local/bin/drive_drives
    if [ "$ONEDRVNAME" = "drives" ];then
    if [ "`pidof gtkdialog_pmount`" != "" ];then #if pmount running, kill it.
    killall gtkdialog_pmount 2>/dev/null
    sleep 0.1
    fi
    exec pmount $DRV_CATEGORY
    fi

    #decision... we can bring up a "handler" window, that explains things, good for beginners.
    #or jump direct to most appropriate target application, or do nothing.
    #for now only have AUTOTARGET=true go direct to most appropriate target app,
    # =false always start Pmount.
    if [ "$AUTOTARGET" = "false" ];then
    if [ "`pidof gtkdialog_pmount`" != "" ];then #if pmount running, kill it.
    killall gtkdialog_pmount 2>/dev/null
    sleep 0.1
    fi
    exec pmount $DRV_CATEGORY
    fi

    #oh, now have to analyse the media, decide what app to run...
    if [ "$ONEDRVNAME" = "sr0" -o "$ONEDRVNAME" = "sr1" ];then
    srPATTERN='^/dev/'"$ONEDRVNAME"' '
    if [ "`busybox mount | grep "$srPATTERN"`" = "" ];then
    cddetect -q -d/dev/${ONEDRVNAME}
    RETVAL=$?
    case $RETVAL in
    3) #iso file: normal data cd.
    true
    ;;
    1) #audio
    ln -snf /dev/${ONEDRVNAME} /dev/cdrom
    exec defaultmediaplayer cdda://
    ;;
    5) #video dvd
    ln -snf /dev/${ONEDRVNAME} /dev/dvd
    exec defaultmediaplayer dvd://
    ;;
    0) #failed to detect type.
    #cddetect does not work properly for dvd's, try something else...
    if [ "`dvd+rw-mediainfo /dev/sr0 | grep 'Mounted Media: .* DVD-ROM'`" != "" ];then
    ln -snf /dev/${ONEDRVNAME} /dev/dvd
    exec defaultmediaplayer dvd://
    fi
    ;;
    esac
    fi
    FSTYPE="iso9660"
    fi

    #if dropped down here, it is likely to be a data partition...
    #if it is a mountable partition then mount and open with rox. If already mntd then open in rox...
    #if [ "$ICONPARTITIONS" = "true" ];then
    if [ "$FSTYPE" != "" ];then
    dPATTERN='^/dev/'"$ONEDRVNAME"' '
    if [ "`df | grep "$dPATTERN"`" = "" ];then
    #not mounted...

    DODEV=/dev/$ONEDRVNAME
    DEVNAME=$ONEDRVNAME
    MNTPT="`cat /etc/fstab | awk -v "DEV=$DODEV" '$1==DEV {print $2; exit}'`"
    if [ -z "$MNTPT" ]; then
    UUID="`blkid | grep "^$DODEV:" | grep -o 'UUID=\"[^\"]*' | sed 's/\"//g'`"
    MNTPT="`cat /etc/fstab | awk -v "DEV=$UUID" 'toupper($1)==toupper(DEV) {print $2; exit}'`"
    fi
    if [ -z "$MNTPT" ]; then
    MNTPT=/mnt/$DEVNAME
    else
    MNTPT="`echo -n "$MNTPT" | sed 's/\\\\040/ /g'`"
    # It seems that mount in PUP4 doesn't work if the mountpoint contains space character,
    # so we fall back to old mountpoint in this case. If PUP4 fixes this problem in future,
    # remove the following line, and this comment, of course.
    echo -n "$MNTPT" | grep " " && MNTPT=/mnt/$DEVNAME
    fi

    mkdir -p "$MNTPT"
    case $FSTYPE in
    ntfs)
    #'mount' is a script that takes care of mounting ntfs...
    mount -t ntfs -o nls=utf8 $DODEV "$MNTPT"
    RETVAL1=$?
    ;;
    vfat)
    mount -t vfat -o shortname=mixed,quiet,utf8 $DODEV "$MNTPT"
    RETVAL1=$?
    ;;
    iso9660)
    mount -t iso9660 -o utf8 $DODEV "$MNTPT"
    RETVAL1=$?
    ;;
    *)
    mount -t $DOFS $DODEV "$MNTPT"
    RETVAL1=$?
    ;;
    esac
    [ $RETVAL1 -eq 0 ] && exec rox -x "$MNTPT" -d "$MNTPT"
    else
    #mounted...
    MNTPT="`df | grep "$dPATTERN" | tr -s ' ' | cut -f 6 -d ' '`"
    if [ -h /mnt/home ];then
    [ "`readlink /mnt/home`" = "$MNTPT" ] && MNTPT="/mnt/home"
    fi
    #exec rox -x /mnt/$ONEDRVNAME -d /mnt/$ONEDRVNAME
    exec rox -x $MNTPT -d $MNTPT
    fi
    fi


    #NOTE: if pmount already running, don't really want to kill then restart,
    # just want to bring the window up if it's minimised ...how?

    if [ "`pidof gtkdialog_pmount`" != "" ];then #if pmount running, kill it.
    killall gtkdialog_pmount 2>/dev/null
    sleep 0.1
    fi

    exec pmount ${DRV_CATEGORY}

    ###END###
  • 匿名用户   16 年 15 周   回复
    Failed to execute child process "/root/.pup_event/drive_sdc1/AppRun" (Permission denied)
  • labrador   16 年 15 周   回复
    .pup_event目录中的内容是根据/usr/local/bin/drive_all生成的。

    有报错最好贴一下提示信息,也好帮你分析。
  • 匿名用户   16 年 15 周   回复
    .pup_event有哪里生成?还机子又重新生成,报错,插新U盘,又重新生成,报错。


    按照制作自己的Puppy Linux Live-CD发行版的三种方法,的第二种方法,打了个包,不错啊,这么就不怕折腾损坏个人文件了。
  • labrador   16 年 15 周   回复
    这个是中文包的问题,可以安装一个新的一步到位中文包,或者用英文的Puppy通用安装程序。不过还是推荐用pup2usb安装,如果有可能的话。
  • 匿名用户   16 年 15 周   回复
    /tmp/installpup.sh: line 6: eval_gettext: command not found
    /tmp/installpup.sh: line 7: eval_gettext: command not found
    /tmp/installpup.sh: line 8: eval_gettext: command not found
    /tmp/installpup.sh: line 9: eval_gettext: command not found
    /tmp/installpup.sh: line 10: eval_gettext: command not found
    /tmp/installpup.sh: line 12: eval_gettext: command not found
  • 匿名用户   16 年 15 周   回复
    无法安装到硬盘?
  • labrador   16 年 15 周   回复
    4.2目前还是alpha版的,离发布正式版还有好几个月的时间。
  • 匿名用户   16 年 15 周   回复
    没有光盘?
  • labrador   16 年 15 周   回复
    应该没有能支持迅雷协议的原生Linux软件,如果想在Linux下用迅雷,基本也就只有wine一条路了。