Commit 0c52f791 authored by cvs2svn's avatar cvs2svn

This commit was manufactured by cvs2svn to create branch 'gtw-protogeni-

config'.

Sprout from master 2008-12-15 23:05:53 UTC Ryan Jackson <rdjackso@flux.utah.edu> 'Lots of changes.'
Cherrypick from master 2008-12-08 23:58:26 UTC Kevin Atkinson <kevina@cs.utah.edu> 'Add backfill values to the database so that I can test the dummynet':
    tmcd/linux/rc.frisbee
    event/delay-agent/callback.c
    tmcd/linux/slicefix
    www/newproject.php3
    tbsetup/ptopgen.in
    tmcd/tmcd.c
    sql/database-create.sql
    tmcd/freebsd/delaysetup
    event/delay-agent/main.h
    mfs/linux_mfs/Makefile
    sql/database-migrate.txt
    mfs/linux_mfs/source/buildroot/Rules.mk
    mfs/linux_mfs/source/busybox/busybox.config
    mfs/linux_mfs/source/busybox/busybox-1.11.0-ssd.patch
    mfs/linux_mfs/source/busybox/busybox-1.11.0-vi.patch
    mfs/linux_mfs/source/linux/linux.config
    mfs/linux_mfs/source/testbed/Rules.mk
    mfs/linux_mfs/source/zlib/Rules.mk
    tmcd/linux/GNUmakefile.in
    mfs/linux_mfs/source/linux/Rules.mk
    tmcd/linux/get_edd_map
    mfs/linux_mfs/source/buildroot/buildroot.config
    xmlrpc/emulabserver.py.in
    mfs/linux_mfs/source/busybox/Rules.mk
    mfs/linux_mfs/source/busybox/busybox-1.11.0-awk.patch
    mfs/linux_mfs/source/busybox/busybox-1.11.0-ip.patch
    mfs/linux_mfs/source/busybox/busybox-1.11.0-bunzip2.patch
Cherrypick from master 2008-12-16 00:11:13 UTC Ryan Jackson <rdjackso@flux.utah.edu> 'Added dropbear back in':
    mfs/linux_mfs/source/dropbear/Makefile
Delete:
    mfs/linux_mfs/source/hdparm/hdparm-8.9.tar.gz
    mfs/linux_mfs/source/target_template/template/etc/init.d/S60frisbee
    mfs/linux_mfs/source/testbed/Makefile
parent b1c62384
......@@ -426,9 +426,6 @@ void set_link_params(int l_index, int blackhole, int p_which)
pipe.bandwidth = p_params->bw;
pipe.delay = p_params->delay;
/* pramod-CHANGES */
pipe.backfill = p_params->backfill;
/* set the pipe number*/
pipe.pipe_nr = link_map[l_index].pipes[p_index];
......@@ -555,7 +552,6 @@ void set_link_params(int l_index, int blackhole, int p_which)
}
/* else DROPTAIL*/
/* now call setsockopt*/
if (setsockopt(s_dummy,IPPROTO_IP, IP_DUMMYNET_CONFIGURE, &pipe,sizeof pipe)
< 0)
......@@ -600,18 +596,7 @@ int get_new_link_params(int l_index, event_handle_t handle,
while((argvalue = strsep(&temp," \n"))){
/*pramod-CHANGES: */
/* Backfill parameters. */
if(strcmp(argtype,"BACKFILL")== 0){
link_map[l_index].params[p_num].backfill = atoi(argvalue) * 1000;
if (! gotpipe) {
link_map[l_index].params[1].backfill =
link_map[l_index].params[0].backfill;
}
}
else if(strcmp(argtype,"BANDWIDTH")== 0){
if(strcmp(argtype,"BANDWIDTH")== 0){
info("Bandwidth = %d\n", atoi(argvalue) * 1000);
link_map[l_index].params[p_num].bw = atoi(argvalue) * 1000;
if (! gotpipe) {
......
......@@ -111,7 +111,6 @@ typedef enum {
typedef struct {
int delay; /* pipe delay*/
int bw; /* pipe bw*/
int backfill; /*pramod-CHANGES, -add backfill to the pipe*/
double plr; /* queue loss rate*/
int q_size; /* queuq size in slots/bytes*/
structRed_params red_gred_params; /* red/gred params*/
......
SOURCE_PATH = $(PWD)/source
TARGET_PATH = $(PWD)/target
SOURCE_PATH = $(PWD)/source
SCRIPTS_PATH = $(PWD)/scripts
TOOLCHAIN_BUILD_PATH = $(PWD)/toolchain_build
TARGET_BUILD_PATH = $(PWD)/build
SCRIPTS_PATH = $(PWD)/scripts
INITRAMFS_PATH = $(PWD)/initramfs.tmp
BUILDROOT_PATH = $(PWD)/buildroot
FAKEROOT_ENVIRONMENT = $(PWD)/fs_fakeroot.env
STAGING_DIR = $(PWD)/buildroot/build_i386/staging_dir
INITRAMFS = $(PWD)/initramfs.gz
BOOT_PATH = $(PWD)/boot
TARGET_PATH = $(PWD)/target
TEMPLATE_PATH = $(PWD)/target_template
TARGET_INITRAMFS = $(PWD)/target.cpio.gz
FAKEROOT_ENVIRONMENT = $(PWD)/$(BUILD)_fs_fakeroot.env
MODULES := busybox zlib linux testbed hdparm target_template
INSTALL_MODULES := $(addsuffix -install,$(MODULES))
CLEAN_MODULES := $(addsuffix -clean,$(MODULES))
TARGET_CC = i386-linux-uclibc-gcc
TARGET_CFLAGS = -Os -mtune=i386 -march=i386
TARGET_MODULES = uclibc-install-target zlib-install-target busybox-install dropbear-install linux-modules-install openssl-install-target kexec-install tmcc-install imagezip-install frisbee-install e2fsprogs-install
TARGET_FS_SIZE = 13568
.PHONY: all clean install root-template-install devices \
root-base root-install $(MODULES) $(INSTALL_MODULES) \
$(CLEAN_MODULES) initramfs
BUILDROOT_PATH = $(PWD)/buildroot
BUILDROOT_VERSION = 20080705
BINUTILS_VERSION = 2.18
GCC_VERSION = 4.2.4
UCLIBC_VERSION = 0.9.29
all: $(MODULES)
OPENSSL_VERSION = 0.9.7m
OPENSSL_PATH = $(TARGET_BUILD_PATH)/openssl-$(OPENSSL_VERSION)
install: uclibc-install $(INSTALL_MODULES)
DROPBEAR_VERSION = 0.51
DROPBEAR_PATH = $(TARGET_BUILD_PATH)/dropbear-$(DROPBEAR_VERSION)
E2FSPROGS_VERSION = 1.41.1
E2FSPROGS_PATH = $(TARGET_BUILD_PATH)/e2fsprogs-$(E2FSPROGS_VERSION)
BUSYBOX_VERSION = 1.11.0
BUSYBOX_PATH = $(TARGET_BUILD_PATH)/busybox-$(BUSYBOX_VERSION)
ZLIB_VERSION = 1.2.3
ZLIB_PATH = $(TARGET_BUILD_PATH)/zlib-$(ZLIB_VERSION)
FAKEROOT_VERSION = 1.8.1
FAKEROOT_PATH = $(TOOLCHAIN_BUILD_PATH)/fakeroot-$(FAKEROOT_VERSION)
GENEXT2FS_VERSION = 1.4.1
GENEXT2FS_PATH = $(TOOLCHAIN_BUILD_PATH)/genext2fs-$(GENEXT2FS_VERSION)
LINUX_VERSION = 2.6.25.9
LINUX_PATH = $(BUILDROOT_PATH)/toolchain_build_i386/linux-$(LINUX_VERSION)
KEXEC_VERSION = 20080324
KEXEC_PATH = $(TARGET_BUILD_PATH)/kexec-tools-$(KEXEC_VERSION)
clean:
rm -rf $(TARGET_PATH)
rm -f $(FAKEROOT_ENVIRONMENT)
rm -rf $(INITRAMFS_PATH)
rm -f $(INITRAMFS)
rm -rf $(TARGET_BUILD_PATH)
rm -rf $(BOOT_PATH)
STAGING_DIR = $(BUILDROOT_PATH)/build_i386/staging_dir/
#HOSTMAKE=make
#HOSTAR=ar
#HOSTAS=as
#HOSTCC=gcc
#HOSTCXX=g++
#HOSTLD=ld
#HOST_CFLAGS=-g -O2
#TOOLCHAIN_PATH="$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(PATH)"
CROSS_COMPILER_PREFIX=i386-linux-uclibc-
STRIPCMD=$(STAGING_DIR)/usr/bin/$(CROSS_COMPILER_PREFIX)strip
#CC=$(STAGING_DIR)/usr/bin/i386-linux-uclibc-gcc -Os -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include --sysroot=$(STAGING_DIR)/ -isysroot $(STAGING_DIR) -mtune=i386 -march=i386
# Hack for building uClibc -- it can't handle parallel make processes.
#MAKE1:=$(HOSTMAKE) MAKE="$(firstword $(HOSTMAKE)) -j1"
HOSTCC=gcc
$(MODULES):
$(MAKE) -C $(SOURCE_PATH)/$@ all
HOST_CONFIGURE_OPTS=PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
AR_FOR_BUILD="$(HOSTAR)" \
AS_FOR_BUILD="$(HOSTAS)" \
CC_FOR_BUILD="$(HOSTCC)" \
GCC_FOR_BUILD="$(HOSTCC)" \
CXX_FOR_BUILD="$(HOSTCXX)" \
LD_FOR_BUILD="$(HOSTLD)" \
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
AR_FOR_TARGET=$(CROSS_COMPILER_PREFIX)ar \
AS_FOR_TARGET=$(CROSS_COMPILER_PREFIX)as \
LD_FOR_TARGET=$(CROSS_COMPILER_PREFIX)ld \
NM_FOR_TARGET=$(CROSS_COMPILER_PREFIX)nm \
RANLIB_FOR_TARGET=$(CROSS_COMPILER_PREFIX)ranlib \
STRIP_FOR_TARGET=$(CROSS_COMPILER_PREFIX)strip \
OBJCOPY_FOR_TARGET=$(CROSS_COMPILER_PREFIX)objcopy
$(CLEAN_MODULES):
$(MAKE) -C $(SOURCE_PATH)/$(subst -clean,,$@) clean
modules := $(addprefix $(SOURCE_PATH)/, buildroot busybox zlib dropbear linux fakeroot openssl kexec-tools testbed e2fsprogs)
$(INSTALL_MODULES):
$(MAKE) -C $(SOURCE_PATH)/$(subst -install,,$@) install
build-env: toolchain build-env-libraries build-tools
$(TARGET_PATH)/lib/libc.so.0:
build-env-libraries: zlib-install-sysroot openssl-install-sysroot
include $(addsuffix /Rules.mk,$(modules))
.PHONY: all root clean root-template-install toolchain build-tools build-env devices \
root-base root-install
all: toolchain
toolchain: buildroot-build
$(TARGET_PATH)/lib/libc.so.0: toolchain
mkdir -p $(TARGET_PATH)/lib
cp -dpR $(BUILDROOT_PATH)/project_build_i386/uclibc/root/lib/* $(TARGET_PATH)/lib
uclibc-install: $(TARGET_PATH)/lib/libc.so.0
uclibc-install-target: $(TARGET_PATH)/lib/libc.so.0
build-tools: fakeroot-install
$(FAKEROOT_ENVIRONMENT):
touch $@
#target-base:
# $(SCRIPTS_PATH)/mk_basic_fs.sh $(TARGET_PATH)
# #rm -f $(FAKEROOT_ENVIRONMENT)
target-install: target-template-install $(TARGET_MODULES)
devices: $(FAKEROOT_ENVIRONMENT)
rm -rf $(TARGET_PATH)/dev
$(STAGING_DIR)/usr/bin/fakeroot -s $(FAKEROOT_ENVIRONMENT) \
......@@ -59,19 +122,19 @@ permissions: $(FAKEROOT_ENVIRONMENT) devices target-install
-i $(FAKEROOT_ENVIRONMENT) \
$(SCRIPTS_PATH)/fixperms.sh $(TARGET_PATH)
initramfs: install
rm -rf $(INITRAMFS_PATH)
cp -dpR $(TARGET_PATH) $(INITRAMFS_PATH)
cat /dev/null > $(FAKEROOT_ENVIRONMENT)
rm -rf $(INITRAMFS_PATH)/dev
$(STAGING_DIR)/usr/bin/fakeroot -s $(FAKEROOT_ENVIRONMENT) \
-i $(FAKEROOT_ENVIRONMENT) \
$(SCRIPTS_PATH)/makedevs.sh \
$(SCRIPTS_PATH)/devices $(INITRAMFS_PATH)
$(STAGING_DIR)/usr/bin/fakeroot -s $(FAKEROOT_ENVIRONMENT) \
-i $(FAKEROOT_ENVIRONMENT) \
$(SCRIPTS_PATH)/fixperms.sh $(INITRAMFS_PATH)
target-initramfs:
$(STAGING_DIR)/usr/bin/fakeroot -i $(FAKEROOT_ENVIRONMENT) \
$(SCRIPTS_PATH)/gen_initramfs.sh $(INITRAMFS_PATH) $(INITRAMFS)
rm -f $(FAKEROOT_ENVIRONMENT)
rm -rf $(INITRAMFS_PATH)
$(SCRIPTS_PATH)/gen_initramfs.sh $(TARGET_PATH) $(TARGET_INITRAMFS)
target-template-install:
mkdir -p $(TARGET_PATH)
cp -dpR $(TEMPLATE_PATH)/* $(TARGET_PATH)
target: target-install devices permissions
build-env-clean:
rm -rf $(BUILDROOT_PATH) $(BUILD_TOOLS)
clean:
rm -rf $(TARGET_BUILD_PATH) $(TARGET_PATH) \
$(FAKEROOT_ENVIRONMENT) $(TARGET_FS)
.PHONY: buildroot-extract buildroot-patch buildroot-config buildroot-sources buildroot-build \
buildroot buildroot-install buildroot-clean
buildroot-extract: $(BUILDROOT_PATH)/.extract-stamp
buildroot-patch: $(BUILDROOT_PATH)/.patch-stamp
buildroot-config: $(BUILDROOT_PATH)/.config-stamp
buildroot-sources: $(BUILDROOT_PATH)/.sources-stamp
buildroot-build: $(BUILDROOT_PATH)/.build-stamp
buildroot-install: $(BUILDROOT_PATH)/.install-stamp
buildroot-clean:
$(MAKE) -C $(BUILDROOT_PATH) clean
rm -f $(BUILDROOT_PATH)/.build-stamp
buildroot: buildroot-build
$(BUILDROOT_PATH)/.extract-stamp:
tar xjf $(SOURCE_PATH)/buildroot/buildroot-$(BUILDROOT_VERSION).tar.bz2
touch $@
$(BUILDROOT_PATH)/.patch-stamp: $(BUILDROOT_PATH)/.extract-stamp
#$(SCRIPTS_PATH)/patch-kernel.sh $(BUILDROOT_PATH) $(SOURCE_PATH)/buildroot/ '*.patch'
touch $@
$(BUILDROOT_PATH)/.config-stamp: $(BUILDROOT_PATH)/.patch-stamp
cp $(SOURCE_PATH)/buildroot/buildroot.config $(BUILDROOT_PATH)/.config
cd $(BUILDROOT_PATH); unset CC; make oldconfig
touch $@
$(BUILDROOT_PATH)/.sources-stamp: $(BUILDROOT_PATH)/.config-stamp
mkdir -p $(BUILDROOT_PATH)/dl
cp $(SOURCE_PATH)/toolchain/* $(BUILDROOT_PATH)/dl
cp $(SOURCE_PATH)/uClibc/uClibc-$(UCLIBC_VERSION).tar.bz2 $(BUILDROOT_PATH)/dl
cp $(SOURCE_PATH)/linux/linux-$(LINUX_VERSION).tar.bz2 $(BUILDROOT_PATH)/dl
touch $@
$(BUILDROOT_PATH)/.build-stamp: $(BUILDROOT_PATH)/.sources-stamp
unset CC; $(MAKE) -C $(BUILDROOT_PATH) all
touch $@
$(BUILDROOT_PATH)/.install-stamp: $(BUILDROOT_PATH)/.build-stamp
#mkdir -p $(STAGING_DIR)/
#$(MAKE) -C $(BUILDROOT_PATH) install
touch $@
This diff is collapsed.
.PHONY: busybox-extract busybox-patch busybox-config busybox-build \
busybox busybox-install busybox-clean
busybox-extract: $(BUSYBOX_PATH)/.extract-stamp
busybox-patch: $(BUSYBOX_PATH)/.patch-stamp
busybox-config: $(BUSYBOX_PATH)/.config-stamp
busybox-build: $(BUSYBOX_PATH)/busybox
busybox-install: $(TARGET_PATH)/bin/busybox
busybox-menuconfig:
$(MAKE) -C $(BUSYBOX_PATH) menuconfig
BUSYBOX_CONFIG = $(SOURCE_PATH)/busybox/busybox.config
$(BUSYBOX_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xjf $(SOURCE_PATH)/busybox/busybox-$(BUSYBOX_VERSION).tar.bz2
touch $@
$(BUSYBOX_PATH)/.patch-stamp: $(BUSYBOX_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(BUSYBOX_PATH) $(SOURCE_PATH)/busybox/ '*.patch'
touch $@
$(BUSYBOX_PATH)/.config-stamp: $(BUSYBOX_PATH)/.patch-stamp
sed "s,^CONFIG_PREFIX.*$$,CONFIG_PREFIX=\"$(TARGET_PATH)/\"," $(BUSYBOX_CONFIG) > \
$(BUSYBOX_PATH)/.config
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(BUSYBOX_PATH) oldconfig
touch $@
$(BUSYBOX_PATH)/busybox: $(BUSYBOX_PATH)/.config-stamp
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(BUSYBOX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX)
touch $@
$(TARGET_PATH)/bin/busybox: $(BUSYBOX_PATH)/busybox
mkdir -p $(TARGET_PATH)
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(BUSYBOX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX) install
busybox-clean:
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(BUSYBOX_PATH) clean
rm -f $(BUSYBOX_PATH)/.build-stamp $(BUSYBOX_PATH)/.config-stamp
busybox: busybox-build
--- busybox-1.11.0/editors/awk.c Wed Jun 25 14:51:37 2008
+++ busybox-1.11.0-awk/editors/awk.c Tue Jul 1 14:03:37 2008
@@ -681,11 +681,6 @@
return (isalnum(c) || c == '_');
}
-static FILE *afopen(const char *path, const char *mode)
-{
- return (*path == '-' && *(path+1) == '\0') ? stdin : xfopen(path, mode);
-}
-
/* -------- working with variables (set/get/copy/etc) -------- */
static xhash *iamarray(var *v)
@@ -2740,7 +2735,7 @@
ind = getvar_s(incvar(intvar[ARGIND]));
fname = getvar_s(findvar(iamarray(intvar[ARGV]), ind));
if (fname && *fname && !is_assignment(fname))
- F = afopen(fname, "r");
+ F = xfopen_stdin(fname);
}
} while (!F);
@@ -2757,8 +2752,9 @@
{
unsigned opt;
char *opt_F, *opt_W;
- llist_t *opt_v = NULL;
- int i, j, flen;
+ llist_t *list_v = NULL;
+ llist_t *list_f = NULL;
+ int i, j;
var *v;
var tv;
char **envp;
@@ -2816,35 +2812,33 @@
*s1 = '=';
}
}
- opt_complementary = "v::";
- opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &g_progname, &opt_W);
+ opt_complementary = "v::f::"; /* -v and -f can occur multiple times */
+ opt = getopt32(argv, "F:v:f:W:", &opt_F, &list_v, &list_f, &opt_W);
argv += optind;
argc -= optind;
if (opt & 0x1)
setvar_s(intvar[FS], opt_F); // -F
- while (opt_v) { /* -v */
- if (!is_assignment(llist_pop(&opt_v)))
+ while (list_v) { /* -v */
+ if (!is_assignment(llist_pop(&list_v)))
bb_show_usage();
}
- if (opt & 0x4) { // -f
- char *s = s; /* die, gcc, die */
- FILE *from_file = afopen(g_progname, "r");
- /* one byte is reserved for some trick in next_token */
- if (fseek(from_file, 0, SEEK_END) == 0) {
- flen = ftell(from_file);
- s = xmalloc(flen + 4);
- fseek(from_file, 0, SEEK_SET);
- i = 1 + fread(s + 1, 1, flen, from_file);
- } else {
+ if (list_f) { /* -f */
+ do {
+ char *s = NULL;
+ FILE *from_file;
+
+ g_progname = llist_pop(&list_f);
+ from_file = xfopen_stdin(g_progname);
+ /* one byte is reserved for some trick in next_token */
for (i = j = 1; j > 0; i += j) {
s = xrealloc(s, i + 4096);
j = fread(s + i, 1, 4094, from_file);
}
- }
- s[i] = '\0';
- fclose(from_file);
- parse_program(s + 1);
- free(s);
+ s[i] = '\0';
+ fclose(from_file);
+ parse_program(s + 1);
+ free(s);
+ } while (list_f);
} else { // no -f: take program from 1st parameter
if (!argc)
bb_show_usage();
This diff is collapsed.
--- busybox-1.11.0/libbb/print_flags.c Wed Jun 25 14:51:32 2008
+++ busybox-1.11.0-ip/libbb/print_flags.c Fri Jun 27 00:39:16 2008
@@ -19,8 +19,8 @@
labels);
need_separator = separator;
flags &= ~ *masks;
- masks++;
}
+ masks++;
labels += strlen(labels) + 1;
}
return flags;
--- busybox-1.11.0/debianutils/start_stop_daemon.c Wed Jun 25 14:51:26 2008
+++ busybox-1.11.0-ssd/debianutils/start_stop_daemon.c Tue Jul 1 14:05:05 2008
@@ -326,7 +326,9 @@
char *signame;
char *startas;
char *chuid;
+#ifdef OLDER_VERSION_OF_X
struct stat execstat;
+#endif
#if ENABLE_FEATURE_START_STOP_DAEMON_FANCY
// char *retry_arg = NULL;
// int retries = -1;
@@ -361,6 +363,8 @@
if (!(opt & OPT_a))
startas = execname;
+ if (!execname) /* in case -a is given and -x is not */
+ execname = startas;
// USE_FEATURE_START_STOP_DAEMON_FANCY(
// if (retry_arg)
@@ -374,7 +378,8 @@
if (errno)
user_id = xuname2uid(userspec);
}
- do_procinit(); /* Both start and stop needs to know current processes */
+ /* Both start and stop need to know current processes */
+ do_procinit();
if (opt & CTX_STOP) {
int i = do_stop();
@@ -383,17 +388,21 @@
if (found) {
if (!QUIET)
- printf("%s already running\n%d\n", execname, found->pid);
+ printf("%s is already running\n%u\n", execname, (unsigned)found->pid);
return !(opt & OPT_OKNODO);
}
+#ifdef OLDER_VERSION_OF_X
if (execname)
xstat(execname, &execstat);
+#endif
*--argv = startas;
if (opt & OPT_BACKGROUND) {
#if BB_MMU
- bb_daemonize(0);
+ bb_daemonize(DAEMON_DEVNULL_STDIO + DAEMON_CLOSE_EXTRA_FDS);
+ /* DAEMON_DEVNULL_STDIO is superfluous -
+ * it's always done by bb_daemonize() */
#else
pid_t pid = vfork();
if (pid < 0) /* error */
@@ -404,19 +413,18 @@
* so "return 0" may do bad things */
_exit(EXIT_SUCCESS);
}
- /* child */
+ /* Child */
setsid(); /* detach from controlling tty */
/* Redirect stdio to /dev/null, close extra FDs.
* We do not actually daemonize because of DAEMON_ONLY_SANITIZE */
- bb_daemonize_or_rexec(
- DAEMON_DEVNULL_STDIO
+ bb_daemonize_or_rexec(DAEMON_DEVNULL_STDIO
+ DAEMON_CLOSE_EXTRA_FDS
+ DAEMON_ONLY_SANITIZE,
NULL /* argv, unused */ );
#endif
}
if (opt & OPT_MAKEPID) {
- /* user wants _us_ to make the pidfile */
+ /* User wants _us_ to make the pidfile */
write_pidfile(pidfile);
}
if (opt & OPT_c) {
@@ -434,6 +442,6 @@
}
}
#endif
- execv(startas, argv);
+ execvp(startas, argv);
bb_perror_msg_and_die("cannot start %s", startas);
}
--- busybox-1.11.0/include/usage.h Wed Jun 25 14:51:35 2008
+++ busybox-1.11.0-ssd/include/usage.h Tue Jul 1 14:03:48 2008
@@ -3637,9 +3637,7 @@
"$ cat TODO | split -a 2 -l 2 TODO_\n"
#define start_stop_daemon_trivial_usage \
- "[OPTIONS] [" \
- USE_GETOPT_LONG("--start|--stop") SKIP_GETOPT_LONG("-S|-K") \
- "] ... [-- arguments...]"
+ "[OPTIONS] [-S|-K] ... [-- arguments...]"
#define start_stop_daemon_full_usage "\n\n" \
"Search for matching processes, and then\n" \
"-S: stop all matching processes.\n" \
--- busybox-1.11.0/editors/vi.c Wed Jun 25 14:51:37 2008
+++ busybox-1.11.0-vi/editors/vi.c Fri Jun 27 06:06:54 2008
@@ -1894,7 +1894,7 @@
p = new_text + (p - text);
text = new_text;
}
- memmove(p + size, p, end - p);
+ memmove(p + size, p, end - size - p);
memset(p, ' ', size); // clear new hole
file_modified++;
return p;
This diff is collapsed.
include ../../variables.mk
DROPBEAR_VERSION = 0.52
DROPBEAR_PATH = $(TARGET_BUILD_PATH)/dropbear-$(DROPBEAR_VERSION)
.PHONY: extract patch config build \
dropbear install clean all
all: dropbear
extract: $(DROPBEAR_PATH)/.extract-stamp
patch: $(DROPBEAR_PATH)/.patch-stamp
config: $(DROPBEAR_PATH)/.config-stamp
dropbear: $(DROPBEAR_PATH)/dropbearmulti
install: $(TARGET_PATH)/usr/sbin/dropbear
$(DROPBEAR_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/dropbear/dropbear-$(DROPBEAR_VERSION).tar.gz
touch $@
$(DROPBEAR_PATH)/.patch-stamp: $(DROPBEAR_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(DROPBEAR_PATH) $(SOURCE_PATH)/dropbear/ '*.patch'
touch $@
#--build=$(GNU_HOST_NAME) \
$(DROPBEAR_PATH)/.config-stamp: $(DROPBEAR_PATH)/.patch-stamp
rm -f $(DROPBEAR_PATH)/config.cache
cd $(DROPBEAR_PATH); autoconf
cd $(DROPBEAR_PATH); \
$(HOST_CONFIGURE_OPTS) \
./configure --prefix=/usr \
--target=i386-linux-uclibc \
--host=i386-linux-uclibc \
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=$(STAGING_DIR)/usr/lib \
--includedir=$(STAGING_DIR)/usr/include \
--with-shared
touch $@
$(DROPBEAR_PATH)/dropbearmulti: $(DROPBEAR_PATH)/.config-stamp
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(DROPBEAR_PATH) \
$(TARGET_CONFIGURE_OPTS) LD=i386-linux-uclibc-gcc \
PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
MULTI=1 SCPPROGRESS=1
touch $@
$(TARGET_PATH)/usr/sbin/dropbear: $(DROPBEAR_PATH)/dropbearmulti
install -d -m 755 $(TARGET_PATH)/usr/sbin
install -d -m 755 $(TARGET_PATH)/usr/bin
install -m 755 $(DROPBEAR_PATH)/dropbearmulti \
$(TARGET_PATH)/usr/sbin/dropbear
$(STRIPCMD) -s $(TARGET_PATH)/usr/sbin/dropbear
ln -snf ../sbin/dropbear $(TARGET_PATH)/usr/bin/scp
ln -snf ../sbin/dropbear $(TARGET_PATH)/usr/bin/ssh
ln -snf ../sbin/dropbear $(TARGET_PATH)/usr/bin/dbclient
ln -snf ../sbin/dropbear $(TARGET_PATH)/usr/bin/dropbearkey
ln -snf ../sbin/dropbear $(TARGET_PATH)/usr/bin/dropbearconvert
mkdir -p $(TARGET_PATH)/etc/init.d
install -m 755 $(SOURCE_PATH)/dropbear/S50dropbear $(TARGET_PATH)/etc/init.d/S50dropbear
mkdir -p $(TARGET_PATH)/usr/lib
touch -c $@
clean:
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(DROPBEAR_PATH) clean
rm -f $(DROPBEAR_PATH)/.build-stamp $(DROPBEAR_PATH)/.config-stamp
KERNEL_CONFIG = $(SOURCE_PATH)/linux/linux.config
LINUX_HEADERS_PATH = $(TOOLCHAIN_BUILD_PATH)/linux
TARGET_MODULE_PATH = $(TARGET_PATH)/lib/modules/$(LINUX_VERSION)
export ARCH=i386
export INSTALL_MOD_PATH=$(TARGET_PATH)
.PHONY: linux linux-extract linux-patch linux-config linux-bzImage \
linux-modules linux-clean linux-menuconfig linux-bzImage-install \
linux-modules-install linux-install linux-headers
linux-extract: $(LINUX_PATH)/.extract-stamp
linux-patch: $(LINUX_PATH)/.patch-stamp
linux-config: $(LINUX_PATH)/.config-stamp
linux-headers: $(LINUX_PATH)/.headers-stamp
linux-menuconfig:
$(MAKE) -C $(LINUX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX) menuconfig
linux-clean:
$(MAKE) -C $(LINUX_PATH) clean
linux-bzImage-install: linux-bzImage
mkdir -p $(TARGET_PATH)/boot
cp $(LINUX_PATH)/arch/i386/boot/bzImage $(TARGET_PATH)/boot/vmlinuz-$(LINUX_VERSION)
cp $(LINUX_PATH)/System.map $(TARGET_PATH)/boot/System.map-$(LINUX_VERSION)
cp $(LINUX_PATH)/.config $(TARGET_PATH)/boot/config-$(LINUX_VERSION)
linux-modules-install: linux-modules
mkdir -p $(TARGET_PATH)/lib/modules
$(MAKE) -C $(LINUX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX) modules_install
/sbin/depmod -b $(TARGET_PATH) $(LINUX_VERSION)
grep -v 'ide[-_]pci[-_]generic' $(TARGET_PATH)/lib/modules/$(LINUX_VERSION)/modules.alias > \
$(TARGET_PATH)/lib/modules/$(LINUX_VERSION)/modules.alias.mod
mv -f $(TARGET_PATH)/lib/modules/$(LINUX_VERSION)/modules.alias.mod \
$(TARGET_PATH)/lib/modules/$(LINUX_VERSION)/modules.alias
$(LINUX_PATH)/.headers-stamp: $(LINUX_PATH)/.config-stamp
$(MAKE) -C $(LINUX_PATH) \
ARCH=i386 \
INSTALL_HDR_PATH=$(TOOLCHAIN_BUILD_PATH)/linux \
headers_install
touch $@
linux-install: linux-bzImage-install linux-modules-install
linux: linux-bzImage linux-modules
$(LINUX_PATH)/.extract-stamp:
mkdir -p $(TOOLCHAIN_BUILD_PATH)
cd $(TOOLCHAIN_BUILD_PATH); tar xjf $(SOURCE_PATH)/linux/linux-$(LINUX_VERSION).tar.bz2
touch $@
$(LINUX_PATH)/.patch-stamp: $(LINUX_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(LINUX_PATH) $(SOURCE_PATH)/linux/ '*.patch'
touch $@
$(LINUX_PATH)/.config-stamp: $(LINUX_PATH)/.patch-stamp
cp $(KERNEL_CONFIG) $(LINUX_PATH)/.config
$(MAKE) -C $(LINUX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX) oldconfig
touch $@
linux-bzImage: $(LINUX_PATH)/.config-stamp
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(LINUX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX) bzImage
linux-modules: $(LINUX_PATH)/.config-stamp
PATH=$(STAGING_DIR)/usr/bin:$(PATH) $(MAKE) -C $(LINUX_PATH) CROSS_COMPILE=$(CROSS_COMPILER_PREFIX) modules
This diff is collapsed.
#!/bin/sh
#
# Start frisbee
#
udhcpc_opts="-q"
LOCKDIR=/var/lock/udhcpc.lock
SUCCESS_FLAG=/var/state/found_controlnet
start() {
echo "Starting frisbee..."
/etc/testbed/rc.frisbee
return $rc
}
stop() {
:
}
restart() {
:
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
include ../../variables.mk
.PHONY: imagezip-build frisbee-build tmcc-build growdisk-build