flashplayer-plugin 手动安装

 安装了几次都没用,忍无可忍把rpm包解压了直奔目录/usr/lib/flash-plugin/  有五个文件

两个脚本 一个库 两个文档 直接看setup脚本

 

因为firefox是自己解压在用户目录下,所以看到LOCATIONS中没自己的目录,直接看最后两行,发现调用两个函数


可以看出所有工作就是在LOCATIIONS中找到安装firefox/plugin目录在里面建立链接 ,链接到/usr/lib/flash-plugin/libflashplayer.so

因为不是rpm安装的 所以要自己把库拷过去,在建立链接;为了节省时间直接把库放了进去:)  ok

 

 

 

 

#!/bin/bash

# These are the standard browser locations as found within Red Hat, Mandrake
# and SuSE Linux, and the tarball installers.
LOCATIONS="/usr/lib/mozilla /usr/lib/mozilla-* /usr/lib/firefox-* /usr/lib/seamonkey-* /usr/lib/netscape /usr/lib/opera /usr/lib/firefox /usr/local/netscape /usr/local/mozilla /usr/local/firefox /usr/local/seamonkey /opt/mozilla /opt/netscape /opt/firefox /opt/seamonkey "

deleteold() {
# Detect, Backup and Delete old global Flash plugins
# Old plugin files are saved in /root/oldflashplugins.tar.gz
# tar and gzip must be installed
if [ ! -f /root/oldflashplugins.tar.gz ]; then
    FILES="libflashplayer.so ShockwaveFlash.class flashplayer.xpt libgnashplugin.so"
    for DIR in $LOCATIONS
    do
        # Skip symlinks
        if [ -h $DIR ]; then continue; fi

        for F in $FILES
        do
            # Add old plugin files to backup and delete lists
            if [ -f $DIR/plugins/$F ]
            then
                BACKUPLIST="$BACKUPLIST $DIR/plugins/$F"
                DELETELIST="$DELETELIST $DIR/plugins/$F"
            fi
            # Add symbolic links to the delete list
            if [ -h $DIR/plugins/$F ]
            then
                DELETELIST="$DELETELIST $DIR/plugins/$F"
            fi
        done
    done

    # Backup and Delete files if delete list contains files.
    if [ "x$DELETELIST" != "x" ]
    then
        # If tar is available, backup files
        tar --version >& /dev/null
        if [ $? -eq 0 ]; then
            tar cfz /root/oldflashplugins.tar.gz $BACKUPLIST >& /dev/null
            rm -f $DELETELIST
            echo
            echo "NOTICE:"
            echo "Files belonging to older Flash plugins have been removed from the filesystem.  For your safety these files have been saved in /root/oldflashplugins.tar.gz.  You may remove this tarball if these files are no longer required."
        else
            echo
            echo "Error: tar is unavailable."
            echo "Unable to backup old Flash plugin files.  They were deleted in order to prevent conflicts."
        fi
    fi
fi


# Remove /etc/flash.license as it is not used anymore
[ -f /etc/flash.license ] && rm -f /etc/flash.license
}

detectbrowsers() {
# Detect Mozilla plugin compatible browsers
for DIR in $LOCATIONS
do
    # Skip symlinks
    if [ -h $DIR ]; then continue; fi
    if [ -d $DIR/plugins ]; then export LIST="$LIST $DIR"; fi
done
}

link() {
# Link Mozilla plugin compatible browsers
for DIR in $LIST
do
    ln -sf /usr/lib/flash-plugin/libflashplayer.so $DIR/plugins/libflashplayer.so
done
}

deletelinks() {
# Delete symlinks
# Remove Mozilla plugin compatible browsers
for DIR in $LIST
do
    rm -f $DIR/plugins/libflashplayer.so
done
}

#=======================
# Main Section
#=======================
# Pre-Uninstall
if [ "$1" = "preun" ]; then
    detectbrowsers
    deletelinks
    exit 0
fi

# Installation
if [ "$1" = "install" ]; then
    deleteold
    detectbrowsers
    link
    exit 0
fi

# Upgrade
if [ "$1" = "upgrade" ]; then
    detectbrowsers
    link
    exit 0
fi

# Manual Setup

detectbrowsers
link

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值