[PATCH] busybox binary name

Denys Vlasenko vda.linux at googlemail.com
Sun Mar 6 17:17:56 UTC 2011


On Sunday 06 March 2011 08:07, Tito wrote:
> > What about ../abc/./def/busybox etc?
> 
> Ops, have not tought about it, OTH as I was asking the user
> for a full path and It is his responsibility to provide a correct one.
> 
> > > 		/* busybox --install [-s] [DIR]: */
> > > 		/* -s: make symlinks */
> > > 		/* DIR: directory to install links to */
> > > 		install_links(argv[0], use_symbolic_links, (argv[3]) ? argv[3] : NULL);
> > > 		return 0;
> > > 	}
> > 
> > 
> > How about this?
> > 
> > http://git.busybox.net/busybox/commit/?id=4a2a86d5e7e7bf284a31af604a738dfa1f1a2240
> > 
> 
> Will fail on ./busybox or bin/busybox, etc
> 
> + if (argv[0][0] == '/')
> + busybox = argv[0];
> + else
> + busybox = bb_busybox_exec_path;
> 
> and will set the path to /proc/self/exe
> and will not work in the end.
> I wonder why should /proc/self/exe be
> a sane default?

bb_busybox_exec_path is used for re-execution of the busybox.
Since /proc is usually mounted, /proc/self/exe refers
to the file which contains current binary.

-- 
vda



More information about the busybox mailing list