Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-06-2014, 06:26 PM
|
#1
|
Member
Registered: Feb 2012
Location: Germany
Distribution: siduction
Posts: 134
Rep:
|
busybox system without sync command: what's best to do?
Hi!
I'm configuring a busybox system as a wire-bound downloader. I'm using a USB thumb drive to save the downloaded files to using a script. That script is meant to continue to run and check a file for more download links. Obviously I'd like to be able to unplug that device immediately when all downloads are finished. (At other times I'd let it connected and add more download links to the file.) But there's no sync command on this particular busybox system.
What's the best thing to do here? (Updating to an newer firmware is not an option as the internet provider this old box is from removed that telnet root access I'm using in later versions.)
Should I just umount/remount after all downloads are finished?
How long would it take until the system flushes the disk cache to the disk if I just waited?
Tried to add a sync link and this was the output when executing it:
Code:
BusyBox v1.00 (2007.04.23-03:09+0000) multi-call binary
Usage: busybox [function] [arguments]...
or: [function] [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use, and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, ash, basename, busybox, cat, chmod, chown, chroot, cp, crond,
crontab, cut, date, dd, df, dmesg, du, dumpleases, echo, egrep,
env, expr, false, fdisk, fgrep, find, free, getopt, getty, grep,
gunzip, gzip, hostname, httpd, ifconfig, inetd, init, insmod,
kill, killall, klogd, ln, logger, login, logread, ls, lsmod, md5sum,
mkdir, mknod, modprobe, more, mount, msh, mv, netstat, passwd,
ping, ps, pwd, rdate, reboot, rm, rmdir, rmmod, route, sed, seq,
sh, sha1sum, sleep, sysctl, syslogd, tail, tar, telnetd, test,
tftp, top, touch, tr, true, tty, udhcpc, udhcpd, udhcpr, umount,
uname, uptime, usleep, vi, wc, wget, xargs, zcat
|
|
|
09-07-2014, 11:38 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
Calling it as 'busybox mount --help' should show mount options. No idea if there are any sysctls that could influence VFS layer writes but I'm pretty sure the underlying umount syscall takes care of flushing, depending on the file system.
|
|
1 members found this post helpful.
|
09-07-2014, 03:26 PM
|
#3
|
Moderator
Registered: Mar 2008
Posts: 22,176
|
Create an alias or just add in a static build. Otherwise you have to rebuild busybox.
|
|
1 members found this post helpful.
|
09-07-2014, 04:08 PM
|
#4
|
Member
Registered: Feb 2012
Location: Germany
Distribution: siduction
Posts: 134
Original Poster
Rep:
|
Hi again!
Thanks for the responses.
Would have gone with jefro's suggestion (the alias). Then I realised what unSpawn was trying to tell me.
mount --help (the system has symbolic links to the busybox binary) only resulted in
Code:
BusyBox v1.00 (2007.04.23-03:09+0000) multi-call binary
Usage: mount [flags] DEVICE NODE [-o options,more-options]
but cat /etc/mtab yielded
Code:
/dev/sda1 /ramdisk/mnt/usb-storage/unknown-USB-0 vfat rw,sync 0 0
So it's synced automatically allready. Needed a push into the right direction, though.
Thanks again.
|
|
1 members found this post helpful.
|
09-08-2014, 05:15 PM
|
#5
|
Moderator
Registered: Mar 2008
Posts: 22,176
|
Thanks for the update and solution.
|
|
|
All times are GMT -5. The time now is 09:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|