From c4321813f9f3cd4136203d52c0f20343d7722228 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 19 Oct 2013 21:30:12 +0100 Subject: stage1: Move the symlink creation from stage1 to init. In order to run stage1 we now need to do things a little differently, namely that we move the symlinking fixups into 'init' itself which we will actually call as a kind of fake switch_root implementation to avoid hacking dracut too much[1]. As we run stage1 during dracut's 'mount' phase we should not do the symlink hacks so early otherwise it will mess up the rest of the dracut initqueue processing. Currently, the initrd's /usr is nuked and then symlinked, but to allow for easier debugging I now just bind mount the stage2 /usr over the top which allows us to unmount it again easily enough if we want to go back. We no longer touch the /bin, /sbin or /lib[64] symlinks as these are relative and simply bind mounting /usr is enough to fix all of them. 1. This scheme will have to change if we eventually swtich to a systemd based dracut invocation. --- mdk-stage1/utils.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'mdk-stage1/utils.h') diff --git a/mdk-stage1/utils.h b/mdk-stage1/utils.h index d42c52d06..b8a77b0ad 100644 --- a/mdk-stage1/utils.h +++ b/mdk-stage1/utils.h @@ -27,9 +27,7 @@ void add_to_env(char * name, char * value); char ** list_directory(char * direct); int string_array_length(char ** a); char * asprintf_(const char *msg, ...); -int scall_(int retval, char * msg, char * file, int line); char *my_dirname(char *path); -#define scall(retval, msg) scall_(retval, msg, __FILE__, __LINE__) void lowercase(char *s); #define ptr_begins_static_str(pointer,static_str) (!strncmp(pointer,static_str,sizeof(static_str)-1)) -- cgit v1.2.1