Installazione fun plug: Difference between revisions
Jump to navigation
Jump to search
m New page: * Copiare nella root directory del Volume_1 :i files: wget "http://www.inreto.de/dns323/fun-plug/0.5/fun_plug" wget "http://www.inreto.de/dns323/fun-plug/0.5/fun_plug.tgz" *Riavviare... |
mNo edit summary |
||
| Line 38: | Line 38: | ||
cd /tmp | cd /tmp | ||
nohup sh /ffp/start/telnetd.sh restart | nohup sh /ffp/start/telnetd.sh restart | ||
* Creare la home di root | |||
cd /mnt/HD_a2/ | |||
mkdir root | |||
cd root/ | |||
mkdir bin | |||
cd bin/ | |||
usermod -d /mnt/HD_a2/root root | |||
store-passwd.sh | |||
exit | |||
* Caricare la chiave ssh | |||
ssh-copy-id root@allstorage.alliance.priv | |||
* Creare il file di startup corretto | |||
<pre> | |||
cat > /ffp/etc/fun_plug.local <<'EOFile' | |||
# Setup clock stuffs | |||
# Adjust clock speed to reduce drift | |||
# See 'adjtimex -h' for available options. | |||
# 9965 works for my DNS-323, ymmv. | |||
adjtimex -t 9965 | |||
# Set local timezone | |||
# For a list of timezone strings see: | |||
# http://www.nas-tweaks.net/CH3SNAS:Tutorials/ntp#Appendix:_Example_Timezone_Str | |||
# Europe/Berlin | |||
echo 'CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' >/etc/TZ | |||
# NOTE that non links are avilable now ! | |||
# Set symlinks for debian profile scripts | |||
echo "$(date) Set symlinks for debian profile scripts" >> /mnt/HD_a2/fun_plug.local.log | |||
ln -sf /ffp/bin/bash /bin/bash | |||
ln -sf /ffp/bin/rsync /usr/bin/rsync | |||
ln -sf /ffp/bin/screen /usr/bin/screen | |||
#Link mountpoint for easy access | |||
echo "$(date) Link mountpoint for easy access" >> /mnt/HD_a2/fun_plug.local.log | |||
mkdir -p /media | |||
rm -f /media/sda2 | |||
ln -sf /mnt/HD_a2 /media/sda2 | |||
rm -f /media/sdb2 | |||
ln -sf /mnt/HD_b2 /media/sdb2 | |||
# Now links are avaulable, use them | |||
# Setup crontab | |||
# BE AWARE ! crontab -e does not work. You need to use crontab FILE | |||
if [ -f /ffp/etc/crontab.funplug ] | |||
then | |||
echo "$(date) Setup crontab" >> /media/sda2/fun_plug.local.log | |||
cat /ffp/etc/crontab.funplug | crontab - | |||
fi | |||
EOFile | |||
</pre> | |||
* Renderlo eseguibile | |||
chmod +x /ffp/etc/fun_plug.local | |||
exit | |||
* Installazione pacchetti | * Installazione pacchetti | ||
| Line 50: | Line 112: | ||
funpkg -i sudo-1.6.9p17-2.tgz tar-1.19-2.tgz vim-7.1-2.tgz | funpkg -i sudo-1.6.9p17-2.tgz tar-1.19-2.tgz vim-7.1-2.tgz | ||
funpkg -u less-418-3.tgz mailx-12.3-1.tgz | funpkg -u less-418-3.tgz mailx-12.3-1.tgz | ||
funpkg -i smartmontools-5.39.1-1.tgz | |||
funpkg -u rsync-3.0.7-1.tgz | funpkg -u rsync-3.0.7-1.tgz | ||
| Line 58: | Line 121: | ||
store-passwd.sh | store-passwd.sh | ||
exit | exit | ||
* Reboot | |||
reboot | |||
* Copiare il profilo | |||
cd bin | |||
scp mnt.vvngrl@fire.rvmgroup.it:bin/* . | |||
sed -i 's@/usr/bin/rsync@/ffp/bin/rsync@' profile-pull | |||
./profile-pull | |||
exit | |||
* Sistemare le permission | |||
chown -R root: . | |||
* Per smartmontools: | |||
smartctl -i -d marvell /dev/sda | |||
==Riferimenti== | ==Riferimenti== | ||
*[http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug CH3SNAS:Tutorials/fun plug - NAS-Tweaks] | *[http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug CH3SNAS:Tutorials/fun plug - NAS-Tweaks] | ||
*[http://wiki.dns323.info/howto:ffp howto:ffp - DNS323Wiki] | *[http://wiki.dns323.info/howto:ffp howto:ffp - DNS323Wiki] | ||
*[http://www.horto.ca/?p=25 Seagate drive firmware issues, your DNS-323 and smartmontools at horto.ca] | |||
Latest revision as of 15:32, 10 September 2010
- Copiare nella root directory del
Volume_1
- i files:
wget "http://www.inreto.de/dns323/fun-plug/0.5/fun_plug" wget "http://www.inreto.de/dns323/fun-plug/0.5/fun_plug.tgz"
- Riavviare il NAS
- Fare telnet all'ip del NAS
telnet allstorage
- L'utente root non ha password, impostarla
pwconv passwd
- Attivare l'utente
usermod -s /ffp/bin/sh root
- Testare il login, e poi uscire
login
exit
- Salvare la password
store-passwd.sh
- Attivare SSH
chmod a+x /ffp/start/sshd.sh sh /ffp/start/sshd.sh start
- Fare il login via SSH
ssh root@allstorage.alliance.priv
- Abilitare il login in telnet (altrimenti non chede password):
cd /ffp/start sed -i '/flags/ s@^@#@' telnetd.sh cd /tmp nohup sh /ffp/start/telnetd.sh restart
- Creare la home di root
cd /mnt/HD_a2/ mkdir root cd root/ mkdir bin cd bin/ usermod -d /mnt/HD_a2/root root store-passwd.sh exit
- Caricare la chiave ssh
ssh-copy-id root@allstorage.alliance.priv
- Creare il file di startup corretto
cat > /ffp/etc/fun_plug.local <<'EOFile'
# Setup clock stuffs
# Adjust clock speed to reduce drift
# See 'adjtimex -h' for available options.
# 9965 works for my DNS-323, ymmv.
adjtimex -t 9965
# Set local timezone
# For a list of timezone strings see:
# http://www.nas-tweaks.net/CH3SNAS:Tutorials/ntp#Appendix:_Example_Timezone_Str
# Europe/Berlin
echo 'CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' >/etc/TZ
# NOTE that non links are avilable now !
# Set symlinks for debian profile scripts
echo "$(date) Set symlinks for debian profile scripts" >> /mnt/HD_a2/fun_plug.local.log
ln -sf /ffp/bin/bash /bin/bash
ln -sf /ffp/bin/rsync /usr/bin/rsync
ln -sf /ffp/bin/screen /usr/bin/screen
#Link mountpoint for easy access
echo "$(date) Link mountpoint for easy access" >> /mnt/HD_a2/fun_plug.local.log
mkdir -p /media
rm -f /media/sda2
ln -sf /mnt/HD_a2 /media/sda2
rm -f /media/sdb2
ln -sf /mnt/HD_b2 /media/sdb2
# Now links are avaulable, use them
# Setup crontab
# BE AWARE ! crontab -e does not work. You need to use crontab FILE
if [ -f /ffp/etc/crontab.funplug ]
then
echo "$(date) Setup crontab" >> /media/sda2/fun_plug.local.log
cat /ffp/etc/crontab.funplug | crontab -
fi
EOFile
- Renderlo eseguibile
chmod +x /ffp/etc/fun_plug.local exit
- Installazione pacchetti
cd /mnt/HD_a2 rsync -av inreto.de::dns323/fun-plug/0.5/packages . cd packages funpkg -i less-418-3.tgz mailx-12.3-1.tgz funpkg -i rsync-3.0.7-1.tgz funpkg -i screen-4.0.3-2.tgz funpkg -i sed-4.1.5-3.tgz funpkg -i shadow-4.1.2.1-1.tgz funpkg -i sudo-1.6.9p17-2.tgz tar-1.19-2.tgz vim-7.1-2.tgz funpkg -u less-418-3.tgz mailx-12.3-1.tgz funpkg -i smartmontools-5.39.1-1.tgz funpkg -u rsync-3.0.7-1.tgz
- Abilitazione bash
funpkg -i bash-3.2-3.tgz chsh root -s /ffp/bin/bash store-passwd.sh exit
- Reboot
reboot
* Copiare il profilo cd bin scp mnt.vvngrl@fire.rvmgroup.it:bin/* . sed -i 's@/usr/bin/rsync@/ffp/bin/rsync@' profile-pull ./profile-pull exit
- Sistemare le permission
chown -R root: .
- Per smartmontools:
smartctl -i -d marvell /dev/sda