/usr/local/buffalo を /mnt/buffalo に移動する。
sil:~# (cd /usr/local; tar cf - buffalo)|(cd /mnt; tar xvf -) buffalo/ : buffalo/var/lock/miconapl sil:~# rm -fr /usr/local/buffalo sil:~# ln -s /mnt/buffalo /usr/local/buffalo sil:~# ls -l /usr/local/buffalo lrwxrwxrwx 1 root staff 12 Feb 25 16:39 /usr/local/buffalo -> /mnt/buffalo sil:~#
Feb 25 16:44:34 sil kernel: usb 2-1: new high speed USB device using ehci_platform and address 2 Feb 25 16:44:34 sil kernel: scsi2 : SCSI emulation for USB Mass Storage devices Feb 25 16:44:39 sil kernel: Vendor: QUANTUM Model: FIREBALLP AS20.5 Rev: 0811 Feb 25 16:44:39 sil kernel: Type: Direct-Access ANSI SCSI revision: 00 Feb 25 16:44:39 sil kernel: SCSI device sdb: 40132503 512-byte hdwr sectors (20548 MB) Feb 25 16:44:39 sil kernel: SCSI device sdb: 40132503 512-byte hdwr sectors (20548 MB) Feb 25 16:44:39 sil kernel: sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > Feb 25 16:44:39 sil kernel: Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0 Feb 25 16:44:39 sil kernel: Attached scsi generic sg1 at scsi2, channel 0, id 0, lun 0, type 0と sdb と認識される。
sil:~# mkdir /tmp/root sil:~# mount /dev/sdb2 /tmp/root sil:~# ls /tmp/root bin boot dev etc home lib mnt proc root sbin share tmp usr var www sil:~#
sil:~# (cd /tmp/root; tar cf - *)|(cd /mnt/buffalo; tar xvf -)
sil:~# umount /tmp/root sil:~# rmdir /tmp/root sil:~#
sil:~# cd /mnt/buffalo/var sil:/mnt/buffalo/var# ls -al total 48 drwxr-xr-x 12 root root 4096 Feb 25 10:13 . drwxr-xr-x 16 root staff 4096 Feb 25 16:48 .. drwxr-xr-x 2 root root 4096 Dec 22 13:41 backup drwxr-xr-x 2 root root 4096 Dec 22 13:41 cache drwxr-xr-x 3 root root 4096 Feb 24 19:41 empty drwxr-xr-x 4 root root 4096 Feb 24 19:41 lib drwxrwxrwx 5 root root 4096 Feb 25 11:14 lock drwxr-xr-x 6 root root 4096 Feb 25 10:13 log drwxr-xr-x 4 root root 4096 Feb 24 19:42 pcast drwxr-xr-x 2 root root 4096 Feb 24 19:41 proftpd lrwxrwxrwx 1 root root 16 Feb 25 16:48 run -> /mnt/ram/var/run drwxr-xr-x 2 root root 4096 Feb 24 19:41 spool lrwxrwxrwx 1 root root 16 Feb 25 16:48 tmp -> /mnt/ram/var/tmp drwxr-xr-x 2 48 48 4096 Feb 24 19:41 www sil:/mnt/buffalo/var# rm run sil:/mnt/buffalo/var# mkdir run sil:/mnt/buffalo/var# mkdir run/apache sil:/mnt/buffalo/var# rm tmp sil:/mnt/buffalo/var# mkdir tmp sil:/mnt/buffalo/var# chmod 1777 tmp sil:/mnt/buffalo/var# ls -l total 48 drwxr-xr-x 2 root root 4096 Dec 22 13:41 backup drwxr-xr-x 2 root root 4096 Dec 22 13:41 cache drwxr-xr-x 3 root root 4096 Feb 24 19:41 empty drwxr-xr-x 4 root root 4096 Feb 24 19:41 lib drwxrwxrwx 5 root root 4096 Feb 25 11:14 lock drwxr-xr-x 6 root root 4096 Feb 25 10:13 log drwxr-xr-x 4 root root 4096 Feb 24 19:42 pcast drwxr-xr-x 2 root root 4096 Feb 24 19:41 proftpd drwxr-xr-x 3 root root 4096 Feb 25 16:53 run drwxr-xr-x 2 root root 4096 Feb 24 19:41 spool drwxrwxrwt 2 root root 4096 Feb 25 16:53 tmp drwxr-xr-x 2 48 48 4096 Feb 24 19:41 www sil:/mnt/buffalo/var# cd ../mnt/disk1/ sil:/mnt/buffalo/mnt/disk1# mkdir share sil:/mnt/buffalo/mnt/disk1# mkdir mediaserver sil:/mnt/buffalo/mnt/disk1#
sil:/mnt/buffalo/mnt/disk1# cd /etc/init.d sil:/etc/init.d# vi hackderokku : sil:/etc/init.d# cat cat hackderokku #!/bin/sh JAIL=/usr/local/buffalo start() { echo -n "Starting hack de rokku!!:" chroot $JAIL mount /proc chroot $JAIL /etc/init.d/httpd.sh start chroot $JAIL /etc/init.d/pcastd.sh start chroot $JAIL /etc/init.d/epg.sh start chroot $JAIL /etc/init.d/clientUtil_servd.sh start } stop() { echo -n "Stopping hack de rokku!!:" chroot $JAIL /etc/init.d/clientUtil_servd.sh stop chroot $JAIL /etc/init.d/epg.sh stop chroot $JAIL /etc/init.d/pcastd.sh stop chroot $JAIL /etc/init.d/httpd.sh stop chroot $JAIL umount /proc } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0 sil:/etc/init.d# chmod 755 hackderokku sil:/etc/init.d# cd .. sil:/etc# ln -s ../init.d/hackderokku rcS.d/S81hackderokku sil:/etc# ln -s ../init.d/hackderokku rc0.d/K11hackderokku sil:/etc# ln -s ../init.d/hackderokku rc6.d/K11hackderokku sil:/etc# ls -l */*hackderokku* -rwxr-xr-x 1 root root 688 Feb 25 17:04 init.d/hackderokku lrwxrwxrwx 1 root root 21 Feb 25 17:17 rc0.d/K11hackderokku -> ../init.d/hackderokku lrwxrwxrwx 1 root root 21 Feb 25 17:17 rc6.d/K11hackderokku -> ../init.d/hackderokku lrwxrwxrwx 1 root root 21 Feb 25 17:16 rcS.d/S81hackderokku -> ../init.d/hackderokku sil:/etc#
sil:/etc# mkdir /usr/local/PCast sil:/etc# echo 'chroot /usr/local/buffalo $0 $*' > /usr/local/PCast/DbAcRap sil:/etc# chmod +x /usr/local/PCast/DbAcRap sil:/etc# ls -l /usr/local/PCast/DbAcRap -rwxr-xr-x 1 root staff 32 Feb 25 17:20 /usr/local/PCast/DbAcRap sil:/etc#
|
楽天市場
Yahoo!ショッピング somap.com TSUKUMO ネットショップ ValuMore! ムラウチドットコム アット・ニフティストア Joshin web |
← 電源ボタン |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ フロント S-ATA port/ S-ATA port at the front panel |