Archiv verlassen und diese Seite im Standarddesign anzeigen : Easy4u Skript aktualisiert
newsDa es doch schon Versionsfortschreibungen zum eAccelerator gegeben hat habe ich das Easy4u Skript (http://www.gargi.org/showthread.php?830-Gargi-s-Unslung-Installations-Skripte) angepasst. Dieses installiert nun den im Moment aktuellen eAccelerator 0.9.6.1.
Da Unslung jetzt allerdings doch schon einige Jahre alt ist (ich glaube von 2007) bin ich am Überlegen, dass ich auch da die Aktualisierungen zu den Unslung Tutorials einstelle. Mittlerweile muss ich sagen ist die Debian Installation auf der NSLU2 eine recht dankbare Geschichte und kommt halt als aktuelles Debian daher. Was man zudem unter Debian auf der NSLU2 macht lässt sich auch etwas leichter auf andere Plattformen übertragen, die Debian fahren.
Lasst mal was dazu hören wie Ihr das seht.
cu
Gargi
FirstOne
07.06.2010, 16:40
Hey,
ich denke deine Arbeit die du dir gemacht hast ist schon mal eine gute Plattform für Neulinge. Aber da die Slug auch immer älter wird denke ich das die Popularität nicht mehr zunimmt. So kann man davon ausgehen, das sie nur noch von Leuten gekauft wird die das Teil schätzen(um aber die Möglichkeiten voll aus zu schöpfen, geht glaube ich kein Weg an Debian vorbei^^)
facefinity
07.06.2010, 23:45
Nun wäre Debian in (Big Endian) verfügbar, würde ich sehr gerne umsteigen, wäre um einiges angenehmer.
little Endian hilft mir nicht gerade weiter, sonst müsste meine Slug mit was anderem ersetzt werden. nur mit was? ist doch ein nettes teil.
Daher bin ich doch noch recht froh über Unslung und nutze es weiterhin!
Bloodyfist
08.06.2010, 16:25
Auf meiner Slug Berhalte ich das Unslung erstmal Bei, wäre dem Debian auf der Kiste nicht abgeneigt da ich damit viel erfahrungen (auch dank diesem Forum) Sammeln konnte. Denke das die Schnecke nicht die Leistung hat die ein Debian braucht.... aber die Kiste ist bei mir Nurnoch spielerei nebenbei habe ja mein Strohmsparserver am rennen.....
@Facefinity schau mal im Oftopic bereich rein da habe ich die suche nach einem NSLU ersatz Dokomentiert
KeNnUnG#23
16.10.2010, 15:19
Ni hao ... sry, lang nichts mehr hoeren lassen ... der Thread hat ja auch schon etwas Staub angesetzt ... hatte es aber schon lang vor, ein leider verwaistes Project mal vorzustellen ... da ich in naher Zukunft der Slug auch mal wieder Leben einhauchen moechte, anbei einfach mal mein Script in die Runde geschmissen ... es muss einiges aktualisiert werden und ein Paar weitere Funktionalitaeten werde ich wohl auch noch mal implementieren ... Vorschlaege, Fehler, Kritik oder was auch immer sind gern gesehen ... aber bitte immer Bescheid geben wenn was neues rein soll, dann kann man das Zentral (siehe Script source) einpflegen und es kommt Allen zu Gute ... wenn es fuer andere auch von Interesse ist, kann man ja mal einen Thread dafuer auf machen ... aber erst mal sehen ... regards
#!/bin/sh
# Script by ITBLee
# http://nslu2.itblee.net
# Execute with root privileges!
# Tested on uNSLUnged NSLU2
# First make sure that $USER have root privileges
# This script installs the basics and whatever else you want on your slug.
if [ "$(id -u)" != "0" ]; then
echo " \033[1;31mSorry, you must execute nslu2shell with root privileges!\033[0m"
exit 1
fi
# Configure local variables
SCRIPT_SOURCE="http://nslu2.itblee.net/scripts"
PACKAGE_SOURCE="http://nslu2.itblee.net/packages"
PROGNAME="nslu2shell"
VERSION="2009_10_18"
IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2` # | awk '{ print $1}'
STATUS="Welcome $USER! Please choose an option below."
WORKDIR=$(pwd)
while true
do
clear
# Create some directories for script environment
mkdir -p $WORKDIR/nslu2shell/logs
LOGDIR=$WORKDIR/nslu2shell/logs
mkdir -p $WORKDIR/nslu2shell/backup
BACKUPDIR=$WORKDIR/nslu2shell/backup
mkdir -p $WORKDIR/nslu2shell/temp
TEMPDIR=$WORKDIR/nslu2shell/temp
# Create some functions for script environment
boolean()
{
# $1 = default answer (y or n)
# $2 = message
if [ $# -ne 2 ]; then
echo " Internal error."
exit 1
fi
if [ "${1}" = "y" ]; then
echo -n "${2} (Y/n)? "
read ANSWER
[ -z "${ANSWER}" ] && ANSWER=y
else
echo -n "${2} (y/N)? "
read ANSWER
[ -z "${ANSWER}" ] && ANSWER=n
fi
}
press_any_key()
{
#stty -icanon min 0 time 100;
echo
echo " Press any key to continue."; # , or wait 10 seconds
echo
any_key="$(dd bs=1 count=1 2>/dev/null)";
#stty sane
}
retry_command()
{
# $1 = number of retries
# $2 = sleep between retries
# $* = command to execute
ROUND=0
MAX=${1}
SLEEP=${2}
shift 2
while [ ${ROUND} -lt ${MAX} ]
do
${*}
RET=$?
[ ${RET} -eq 0 ] && break
ROUND=`expr ${ROUND} + 1`
if [ ${ROUND} -lt ${MAX} ]; then
echo ""
echo "Retries left `expr ${MAX} - ${ROUND}`"
echo "Retrying in ${SLEEP} sec."
echo ""
sleep ${SLEEP}
debug_wait_for_enter
fi
done
}
update()
{
# Download package indices (try max 10 times)
retry_command 10 30 ipkg update
if [ ${RET} -ne 0 ]; then
echo ""
echo " Program aborted due to repository failures."
echo ""
exit 1
fi
}
upgrade()
{
# Upgrade installed packages (try max 3 times)
retry_command 3 1 ipkg upgrade
if [ ${RET} -ne 0 ]; then
echo ""
echo " WARNING: upgrade failed even after multiple retries!"
echo " Press ENTER to continue."
read ENTER
fi
}
fetch_file()
{
# $1 = destdir
# $2 = script_name
(cd "${1}" && wget "${2}")
}
backup_file()
{
# $1 = given dir
(mv "${1}" $BACKUPDIR)
}
echo " _ ____ _ _ _"
echo " _ __ ___| |_ _|___ \___| |__ ___| | |"
echo " | '_ \/ __| | | | | __) / __| '_ \ / _ \ | |"
echo " | | | \__ \ | |_| |/ __/\__ \ | | | __/ | |"
echo " |_| |_|___/_|\__,_|_____|___/_| |_|\___|_|_|"
echo
echo -e " NSLU2 Install Script Version: \033[1;37m$VERSION\033[0;37m"
echo "--------------------------------------------------------"
echo " 2009 by ITBLee www.itblee.net"
echo "--------------------------------------------------------"
echo -e " Please make sure:"
echo " 1. You've uNSLUnged your Slug on Disk 2." # $USER is root on $IP.
echo " 2. If you want to install the webservices components,"
echo " you have created a user for it"
echo " and changed the default port."
echo " 3. You have a coffee for waiting time."
echo "--------------------------------------------------------"
echo -ne ' \033[1;37mStatus:\033[0;37m' $STATUS
echo
echo
echo -e ' \033[1;33m(1) Install basic system components\033[0m'
echo -e ' \033[1;33m(2) Install webservice components\033[0m'
echo -e ' \033[1;33m[3] Install media server components\033[0m'
echo -e ' \033[1;33m[5] Install GUI components\033[0m'
echo -e ' \033[1;33m[6] Upgrade installed packages\033[0m'
echo -e ' \033[1m(u) Update Script\033[0m'
echo -e ' \033[1m8. Script Changelog\033[0m'
echo -e ' \033[1m(q) Exit\033[0m'
echo
read choice_main
case "$choice_main" in
"1")
cd $WORKDIR
while true
do
echo
boolean "n" " Do you want to install additional editor 'nano'?"
case "${ANSWER}" in
y|Y|yes|YES)
ADD_EDIT="nano"
echo -e ' \033[1;33m'$ADD_EDIT'\033[0m \033[1mwill be installed as aditional editor.\033[0m'
break
;;
n|N|no|NO)
echo -e " \033[1mAditional editor 'nano' not selected.\033[0m"
break
;;
*)
echo " \033[1;31mInput error!\033[0m"
;;
esac
done
while true
do
echo
boolean "y" " Do you want to install 'OpenSSH'?"
case "${ANSWER}" in
y|Y|yes|YES)
SEC_SHELL="openssh"
echo -e ' \033[1;33m'$SEC_SHELL'\033[0m \033[1mwill be installed for encrypted communication sessions.\033[0m'
break
;;
n|N|no|NO)
echo -e " \033[1m'OpenSSH' not selected.\033[0m"
break
;;
*)
echo " \033[1;31mInput error!\033[0m"
;;
esac
done
while true
do
echo
boolean "n" " Do you want to install development tools 'optware-devel'?"
case "${ANSWER}" in
y|Y|yes|YES)
DEV_TOOLS="optware-devel"
echo -e ' \033[1;33m'$DEV_TOOLS'\033[0m \033[1mwill be installed for development.\033[0m'
;;
n|N|no|NO)
echo -e " \033[1mDevelopment tools not selected.\033[0m"
break
;;
*)
echo " \033[1;31mInput error!\033[0m"
;;
esac
done
echo
echo -e ' \033[1;33m'$PROGNAME'\033[0m will now upgrade your system before'
echo -e ' installing basics like: \033[1mbash htop mc screen ntpclient\033[0m'
echo -e ' and following additional packages: \033[1;33m'$ADD_EDIT' '$SEC_SHELL' '$DEV_TOOLS'\033[0m'
echo -e ' \033[1;33mafterwards system is going to reboot\033[0m.'
echo
press_any_key
echo
echo -e ' \033[1;37mSystem is going to update the repositories.\033[0;37m' | tee $LOGDIR/upgrade.log
echo
update | tee -a $LOGDIR/upgrade.log
echo
echo -e ' \033[1;37mSystem is going to upgrade the installed applications.\033[0;37m' | tee -a $LOGDIR/upgrade.log
echo
#upgrade | tee -a $LOGDIR/upgrade.log
echo
echo -e ' \033[1;37mSystem is going to install applications for \033[1;33mbasic system\033[0m.\033[0;37m' | tee $LOGDIR/install.log
echo
#ipkg install bash htop mc screen ntpclient $ADD_EDIT $SEC_SHELL $DEV_TOOLS | tee -a $LOGDIR/install.log
#fetch_file "/" "$SCRIPT_SOURCE/.bashrc"
#fetch_file "/root" "$SCRIPT_SOURCE/.bashrc"
#fetch_file "/etc" "$SCRIPT_SOURCE/profile"
#backup_file "/etc/crontab"
#fetch_file "/etc" "$SCRIPT_SOURCE/crontab"
#sync
#reboot
break
;;
"2")
cd $WORKDIR
while true
do
echo
echo -e ' \033[1;33m1. Install vsFTPd server\033[0m'
echo -e ' \033[1;33m2. Install Apache server\033[0m'
echo -e ' \033[1;33m3. Install MySQL\033[0m'
echo -e ' \033[1;33m4. Back to menu\033[0m'
echo
read choice_wsc
case "$choice_wsc" in
"1")
#mkdir -p /usr/share/empty
#mkdir -p /opt/var
#mkdir -p /opt/var/log
#touch /opt/var/log/vsftpd.log
#ipkg install vsftpd
#fetch_file "/unslung" "$SCRIPT_SOURCE/rc.xinetd"
#echo "chroot_local_user=YES" >> /opt/etc/vsftpd.conf
echo -e ' \033[1mvsFTPd server installation done.\033[0m'
;;
"2")
while true
do
boolean "n" " Do you really have created a user for it & changed the default port?"
case "${ANSWER}" in
y|Y|yes|YES)
echo
echo " Wich port do you want to use for Apache server? [e.g. 80]"
read apache_port
echo " Name your apache user: [e.g. webserver]"
read apache_user
echo " Name your html directory:"
echo -e ' \033[1mIf you want to save the files directly under your apache user simply press enter.\033[0m'
read html_dir
boolean "n" " Do you want to install MySQL on your slug too?"
case "${ANSWER}" in
y|Y|yes|YES)
ADD_DBMS="php-mysql"
echo " Choose your MySQL root password:"
read sql_passwd
echo -e ' \033[1;33m'$ADD_DBMS'\033[0m \033[1mwill be installed as DBMS.\033[0m'
;;
n|N|no|NO)
echo -e " \033[1mMySQL installation aborted.\033[0m"
break
;;
*)
echo " \033[1;31mInput error!\033[0m"
;;
esac
ipkg install apache
mkdir /$apache_user/$html_dir
chown -R $apache_user:everyone /$apache_user/$html_dir
chmod -R 755 /$apache_user/$html_dir
mv /opt/etc/apache2/httpd.conf $WORKDIR/httpd.conf.save # backup
fetch_file "/opt/etc/apache2" "$SCRIPT_SOURCE/httpd.conf"
cat /opt/etc/apache2/httpd.conf | sed "s/8000/$apache_port/g" | sed "s/\/opt\/share\/www/\/$apache_user\/$html_dir/g" | sed 's/DirectoryIndex index.html/DirectoryIndex index.html index.htm index.php/g' > /opt/etc/apache2/httpd.conf.temp
mv /opt/etc/apache2/httpd.conf $WORKDIR/httpd.conf.save.2 # backup
mv /opt/etc/apache2/httpd.conf.temp /opt/etc/apache2/httpd.conf
ipkg install php-apache eaccelerator $ADD_DBMS
if [ "$ADD_DBMS" = "php-mysql" ]
then
/opt/bin/mysqladmin -u root password $sql_passwd
fi
fetch_file "/$apache_user/$html_dir" "$SCRIPT_SOURCE/php_info"
mv /$apache_user/$html_dir/php_info /$apache_user/$html_dir/php_info.php
chown $apache_user:everyone /$apache_user/$html_dir/php_info.php
chmod 755 /$apache_user/$html_dir/php_info.php
break
;;
n|N|no|NO)
echo -e ' \033[1;31mPlease follow the instructions!\033[0m'
break
;;
*)
echo -e ' \033[1;31mInput error!\033[0m'
;;
esac
done
;;
"4")
break
;;
* )
echo -e ' \033[1;31mPlease select a valid menu option!\033[0m'
;;
#sync
#reboot
esac
done
;;
"3")
while true
do
echo
echo -e ' \033[1;33m1. Install firefly media server\033[0m'
echo -e ' \033[1;33m2. Install FirePlay frontend\033[0m'
echo -e ' \033[1;33m3. Install uShare for DLNA support\033[0m'
echo -e ' \033[1;33m4. Back to menu\033[0m'
echo
read choice_msc
case "$choice_msc" in
"1")
while true
do
boolean "n" " Do you have already a firefly media server installed?"
case "${ANSWER}" in
y|Y|yes|YES)
backup_file "/opt/etc/mt-daapd/mt-daapd.conf"
backup_file "/opt/etc/mt-daapd/mt-daapd.playlist"
break
;;
n|N|no|NO)
echo " Nothing to backup."
break
;;
*)
echo -e ' \033[1;31mInput error!\033[0m'
;;
esac
done
while true
do
boolean "y" " Do you want to use the default port for firefly media server? [e.g. 3689]"
case "${ANSWER}" in
y|Y|yes|YES)
echo -e ' \033[1mAfter installation you will find the firefly GUI under:\033[0m'
echo -e " \033[1m$IP:3689\033[0m"
break
;;
n|N|no|NO)
echo " Choose your prefered port:"
read fms_port
echo -e ' \033[1mAfter installation you will find the firefly GUI under:\033[0m'
echo -e " \033[1m$IP:$fms_port\033[0m"
break
;;
*)
echo -e ' \033[1;31mInput error!\033[0m'
;;
esac
done
while true
do
echo
echo -e " Which Version of firefly media server would you like to install?"
echo
echo -e ' \033[1;33m1. Stable build 0.2.4.2\033[0m'
echo -e ' \033[1;33m2. Most stable nightly build version svn-1586\033[0m'
echo -e ' \033[1;33m3. (Cutting-edge) Unstable build version svn-1696\033[0m'
echo -e ' \033[1;33m4. Back to menu\033[0m'
echo
echo -e " See the following table for further informations."
echo -e " http://www.fireflymediaserver.org/download.php"
read choice_fms
case "$choice_fms" in
"1")
echo ""
echo -e ' Stable build 0.2.4.2 selected!'
echo ""
break
;;
"2")
echo ""
echo -e ' Nightly build version svn-1586 selected!\033[0m'
echo ""
break
;;
"3")
echo ""
echo -e ' Unstable build version svn-1696 selected!\033[0m'
echo ""
break
;;
"4")
break
;;
* )
echo " No valid option received. Try again."
;;
esac
done
;;
"4")
break
;;
* )
echo " No valid option received. Try again."
;;
esac
done
;;
"5")
cd $WORKDIR
echo ""
echo " Name your apache user: [e.g. webserver]"
read apache_user
echo " Name your allowed IP adress."
read allowed_IP
echo -e ' \033[1;37mSystem is going to install crontab GUI.\033[0;37m' | tee $LOGDIR/upgrade.log
echo ""
fetch_file "/$apache_user/html" "$PACKAGE_SOURCE/crontab_gui.tar.gz" | tee -a $LOGDIR/upgrade.log
cd /$apache_user/html
tar -xzvf /$apache_user/html/crontab_gui.tar.gz | tee -a $LOGDIR/upgrade.log
chown -R $apache_user:everyone /$apache_user/html/crontab_gui
chmod -R 755 /$apache_user/html/crontab_gui
# chown $apache_user:everyone /$apache_user/html/crontab_gui/config.xml.php | tee -a $LOGDIR/upgrade.log
chmod 766 /$apache_user/html/crontab_gui/config.xml.php | tee -a $LOGDIR/upgrade.log
echo "allow from $allowed_IP" >> /$apache_user/html/crontab_gui/.htaccess
break
;;
"6")
cd $WORKDIR
echo ""
echo -e ' \033[1;37mSystem is going to update the repositories.\033[0;37m' | tee $LOGDIR/upgrade.log
echo ""
update | tee -a $LOGDIR/upgrade.log
echo ""
echo -e ' \033[1;37mSystem is going to upgrade the installed applications.\033[0;37m' | tee -a $LOGDIR/upgrade.log
echo ""
upgrade | tee -a $LOGDIR/upgrade.log
break
;;
"7")
cd $WORKDIR
rm nslu2shell.sh
wget $SCRIPT_SOURCE/nslu2shell.sh | tee $LOGDIR/get.log
echo ""
echo -e ' \033[1;37mScript updated!\033[0;37m' | tee -a $LOGDIR/get.log
#read -n1 -t10 any_key
press_any_key
sh nslu2shell.sh
break
;;
"8")
STATUS='Latest Changes:\n
2009-10-18 -----------------------\n
- Updated script variables\n
2009-03-02 -----------------------\n
- Fixed minor bugs and redesigned the questions asked on installation\n
2009-01-22 -----------------------\n
- Implemented logging support, writes logfiles in home dir\n
2008-12-13 -----------------------\n
- After some drinks the first script version was born'
;;
"9")
break #"breaks" out of the menu, causing the script to exit
;; # ;; Terminates option
* )
# Default option.
STATUS='\033[1;31mPlease select a valid menu option!\033[0m'
;;
esac
done
Uhi! Das liest sich schonmal sehr fein!
Powered by vBulletin® Version 4.1.12 Copyright ©2012 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.