• November 19, 2019, 11:22:18 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: 1 [2]

Author Topic: Tutorial: fun_plug 0.7 running off usb stick  (Read 28708 times)

sparomba

  • Level 1 Member
  • *
  • Posts: 14
Re: Tutorial: fun_plug 0.7 running off usb stick
« Reply #15 on: March 31, 2015, 03:19:20 AM »

Thanks for the scripts and the idea k1kfr3sh! The uwchmod didn't work for me either. I'm now using your script with a few changes.

Quote from: k1kfr3sh
Changing .bootstrap/setup.sh to copy ffp to the USB drive. Although several 100M it is only done at startup.

Instead of copying the entire ffp directory on every boot to usb, you can also use rsync. This fixes the 777 permission problem with the files and directories on the usb drive without needing to copy them over again.
I also added a 30s delay because the setup.sh got executed before the dns-320l even mounted the usb drive (at least on my device).

This is the setup.sh I'm using:
Code: (setup.sh) [Select]
#!/bin/sh
#
# Script .bootstrap/setup.sh
#
# Called by fun_plug to prepare USB key execution environment
# If everything is ok, fun_plug will run from the USB key
#
# 08/09/2012 - V1.0 by Nicolas Bernaerts

# Set default path
PATH=/usr/sbin:/sbin:/usr/bin:/bin
CONTINUE=1

# Environment variables. You may adjust them
FFP_HD="/mnt/HD/HD_a2"
FFP_USB="/mnt/USB/USB1_c1"

# Check if a USB removable disk has been detected. If not, exit
if [ "$CONTINUE" -eq 1 ]; then
  # get the USB key partition
  sleep 30
  USB_PARTITION=`df | grep "${FFP_USB}" | sed 's/^\([a-z0-9\/]*\).*$/\1/g'`
  # if partition has been mounted, remount it with noatime, else exit
  if [ -z "${USB_PARTITION}" ]; then
    CONTINUE=0
    echo "ERROR - USB device has not been detected as Mass Storage"
  else
    echo "Unmounting usb partition: ${USB_PARTITION}"
    umount ${USB_PARTITION}
    mount ${USB_PARTITION} -t ext3 ${FFP_USB} -o noatime 2>/dev/null
    echo "USB - USB disk mounted under ${FFP_USB}"
  fi
fi

# Check presence of ffp directory at the USB key root. If not present, exit
if [ "$CONTINUE" -eq 1 ]; then
  if [ ! -d "${FFP_USB}/ffp" ] ; then
    CONTINUE=0
    echo "ERROR - Directory ${FFP_USB}/ffp doesn't exist"
  else
    echo "USB - Directory ${FFP_PATH} present"
  fi
fi

# Check presence of ffp directory at the HD root. If not present, exit
if [ "$CONTINUE" -eq 1 ]; then
  if [ ! -d "${FFP_HD}/ffp" ] ; then
    CONTINUE=0
    echo "ERROR - Directory ${FFP_PATH} doesn't exist"
  else
     rsync --delete -aqv ${FFP_HD}/ffp/ ${FFP_USB}/ffp
echo "HD -> USB | Files synced to USB"
  fi
fi

# Declare USB key ffp directory as ffp root
if [ "$CONTINUE" -eq 1 ]; then
    FFP_PATH=${FFP_USB}/ffp
    # Move tmp to the usb stick, such that there is enough temp space
    rm -rf ${FFP_USB}/tmp
    mkdir ${FFP_USB}/tmp
    cp -a /tmp/* ${FFP_USB}/tmp
    rm -rf /tmp 2>/dev/null
    ln -s ${FFP_USB}/tmp /tmp
    echo "USB - Fun_Plug is running from USB key under ${FFP_PATH}, accessible thru /ffp"
else
    echo "ERROR - Fun_Plug root can't be moved to USB Key"
fi
Logged

slevin7

  • Level 1 Member
  • *
  • Posts: 1
Re: Tutorial: fun_plug 0.7 running off usb stick
« Reply #16 on: March 21, 2016, 09:02:21 AM »

Please, do not ask why or how.
but i managed to partitioned my second harddrive in my nas.
I just blind copy and paste this show commands: m
show partitions: p
delete partitions: d
make new partition: n
3x Enter
partion ID: t
partion ID: 83 for Linux
write table: w

normalies this would not happend to me but after several beers, this great idea came in my mind.
is there any way to parted my drive back?


thanks for any advice and please dont laugh to loud

some information, I hade raid0, I tried recovery with testdisk but i have no idea with partition I should write.

Sorry for bad English
« Last Edit: March 21, 2016, 09:22:52 AM by slevin7 »
Logged

sbrbot

  • Level 2 Member
  • **
  • Posts: 74
Re: Tutorial: fun_plug 0.7 running off usb stick
« Reply #17 on: August 17, 2016, 12:08:17 PM »

For those that haven't already read about it, fun_plug does not work any more in Dlink DNS-320L since firmware version 1.06. I've been using it successfully for several years but it seems that fun_plug is now obsolete. New mechanism with add-ons has been established and it's good.
Logged

chbong

  • Level 1 Member
  • *
  • Posts: 3
Re: Tutorial: fun_plug 0.7 running off usb stick
« Reply #18 on: September 04, 2016, 03:04:17 AM »

I just upgraded to 1.07 and discovered that fun_plug not longer work. I just realized it was obsolete. Is there any way to control the fan speed? I used to use a script to control the fan speed.
Logged
Pages: 1 [2]