How to build megadl on your Synology DS215j

移动互联 2016-04-05

Optware Bootstrap

Set up ipkg

feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'`
wget $feed/$ipk_name
tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src cross $feed" > /opt/etc/ipkg/feeds.conf

Create the optware root directory

mkdir /volume1/@optware
mv /opt/* /volume1/@optware/
rm -r /opt
ln -s /volume1/@optware /opt

Add /opt
to PATH

Add the following line to /root/.profile or if you are using a user-account to get SSH access /home/username/.bashrc or the ZSH equivalent /home/username/.zshrc.

export PATH=/opt/bin:/opt/sbin:$PATH

Set up the init-scripts

Create the folder where the script will be placed.

mkdir -p /usr/local/etc/rc.d/

/usr/local/etc/rc.d/optware.sh
:

#!/bin/sh
#
# Optware setup
# Alternatives Optware Startup und Shutdown Script #/usr/local/etc/rc.d/optware.sh
#
case $1 in
start)
       [ ! -h /opt -a ! -d /opt ] && ln -s /volume1/@optware /opt
       for i in /opt/etc/init.d/S??* ;do
#
               # Ignore dangling symlinks (if any).
               [ ! -f "$i" ] && continue
#
               case "$i" in
                  *.sh)
                       # Source shell script for speed.
                       (
                               trap - INT QUIT TSTP
                               set start
                               . $i
                       )
                       ;;
                  *)
                       # No sh extension, so fork subprocess.
                       $i start
                       ;;
               esac
       done
       ;;
#
stop)
#
       for i in /opt/etc/init.d/S??* ;do
#
               # Ignore dangling symlinks (if any).
               [ ! -f "$i" ] && continue
#
               case "$i" in
                  *.sh)
                       # Source shell script for speed.
                       (
                               trap - INT QUIT TSTP
                               set stop
                              . $i
                       )
                       ;;
                  *)
                       # No sh extension, so fork subprocess.
                       $i stop                       ;;
               esac
         done
         ;;
#
*)
         echo "Usage: $0 [start|stop]"
         ;;
esac
#
# End

Make it executable.

chmod +x /usr/local/etc/rc.d/optware.sh

Then reboot.

reboot

Install packages with ipkg

Update the packages list and install packages that you need (like gawk
etc.).

ipkg update
ipkg install [YOUR PACKAGES] # I forget to take notes

Build megadl

Download toolchains from sourceforge
and export correct paths.

Download megatools
, unzip, configure, make, and you can build now.

责编内容by:Perfect Freeze! (源链)。感谢您的支持!

您可能感兴趣的

Linux下Socket编程—connect()函数的包裹函数介绍... 这里主要介绍的是在TCP连接中的应用 connect()函数简介 1. 功能:用于客户端建立tcp连接,发起三次握手过程。 ...
Linux服务器安全配置实例(二)用户账户权限配置... 没有绝对的安全 在上一篇文章《linux服务器安全配置实例(一)》中介绍了我对ssh服务的一些常用的安全配置和性能优化。 其实ssh服务是我们进入服务器...
做Linux背锅2年,我总结了这六类好习惯和30个血的教训... 从事运维一年半,遇到过各式各样的问题,数据丢失,网站挂马,误删数据库文件,黑客攻击等各类问题 今天想简单整理一下,分享给各位小伙伴 一、...
在Linux上重新映射Win,Ctrl和Alt键 用惯了Mac上的CMD + * 等操作,就习惯了左手大拇指这个组合键操作了,切换到Linux上必须要Ctrl各种小指不舒服。。。值得一提的是Mac上左侧按键顺序...
如何自动唤醒和关闭Linux 了解如何通过配置 Linux 计算机来根据时间自动唤醒和关闭。 不要成为一个电能浪费者。如果你的电脑不需要开机就请把它们关机。出于方便和计算机宅的...