【发布时间】:2011-06-24 19:10:45
【问题描述】:
我创建了一个 debian 包。我需要在安装这个 .deb 时检查 Adobe Flash Player。如果没有安装 Flash Player,那么我也需要安装它。在浏览时,我知道 postinst 文件可用于此目的。 postinst 文件是
#!/bin/bash
echo “Stopping any Firefox that might be running”
sudo killall -9 firefox
echo “Removing any other flash plugin previously installed:”
sudo apt-get remove -y –purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper
echo “Installing Flash Player 10″
#cd ~
sudo cp /home/libflashplayer.so /usr/lib/mozilla/plugins/
echo “Linking the libraries so Firefox and apps depending on XULRunner.”
sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox-addons/plugins/
sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/xulrunner-addons/plugins/
# now doing some cleaning up:
sudo rm -rf libflashplayer.so
sudo rm -rf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
但是什么都没有发生。 谁能帮我写个脚本来通过脚本安装flash player?
【问题讨论】:
-
为什么不使用 debian/control 将 flash 插件列为软件包的依赖项?
-
有什么错误信息可以告诉我们吗?
-
信号
-9(SIGKILL) 只能作为最后的手段使用,因为它无法被捕获,因此程序没有机会优雅地退出。尝试#!/bin/bash -x进行跟踪,看看发生了什么。
标签: bash