Le 11/05/2014 20:46, William Harrington a écrit :
> 
> On May 10, 2014, at 8:51 PM, William Harrington wrote:
> 
>> 086-creatingdirs:  085-grub-build
>>        @$(call echo_message, Building)
>>        @export BASHBIN=$(SHELL) && $(SHELL) progress_bar.sh $@ $$PPID &
>>        @echo "$(nl_)`date`$(nl_)" >logs/$@
>>        @$(PRT_DU) >>logs/$@
>>        @source ~/.bashrc && \
>>        $(CMDSDIR)/boot/$@ >> logs/$@ 2>&1 && \
>>        $(PRT_DU) >>logs/$@
>>        @$(call housekeeping)
>>
>> We don't have a ~/.bashrc for root.
>>
>> It looks like that is being pulled in from common/libs/func_wrt_Makefile in
>> jhalfs.
>> Should it be using clfs user's .bashrc at that time?
> 
> Okay a bit farther now:
> 
> @@ -349,8 +350,13 @@
>      # First append each name of the script files to a list (this will become
>      # the names of the targets in the Makefile
>      case "${this_script}" in
> -      *changingowner)  orphan_scripts="${orphan_scripts} ${this_script}"  ;;
> -      *devices)        orphan_scripts="${orphan_scripts} ${this_script}"  ;;
> +      *changingowner*)  orphan_scripts="${orphan_scripts} ${this_script}"  ;;
> +      *creatingdirs*)        orphan_scripts="${orphan_scripts}
> ${this_script}"  ;;
> +      *ceatefiles*)  orphan_scripts="${orphan_scripts} ${this_script}"  ;;
> +      *devices*)        orphan_scripts="${orphan_scripts} ${this_script}"  ;;
> +      *fstab*)        orphan_scripts="${orphan_scripts} ${this_script}"  ;;
> +      *pwdgroup*)        orphan_scripts="${orphan_scripts} ${this_script}"  
> ;;
> +      *settingenvironment*)        orphan_scripts="${orphan_scripts}
> ${this_script}"  ;;
>        *)               boottools="$boottools $this_script" ;;
>      esac
>      #
> 
> as before.
> This time I added for the following to be added to mk_RunAsRoot
> 
> @@ -391,7 +397,11 @@
>         # The following 2 scripts are defined in the /boot directory but need
>         # to be run as a root user. Set them up here but run them in another
> phase
>        *changingowner*)  wrt_RunAsRoot "${file}"    ;;
> +      *creatingdirs*)  wrt_RunAsRoot "${file}"    ;;
> +      *createfiles*)  wrt_RunAsRoot "${file}"    ;;
>        *devices*)        wrt_RunAsRoot "${file}"    ;;
> +      *pwdgroup*)  wrt_RunAsRoot "${file}"    ;;
> +      *settingenvironment*)  wrt_RunAsRoot "${file}"    ;;
>        *fstab*)   if [[ -n "$FSTAB" ]]; then
>                     LUSER_wrt_CopyFstab
>                   else
> 
> Then the are added to SUDO in the Makefile:
> SUDO:          088-creatingdirs 090-devices 091-pwdgroup 092-fstab
> 093-settingenvironment 095-changingowner
> 
> However, they are still ran as the clfs user and will fail at the creation of
> devices when using mknod.
Did you try ?
The Makefile has:
mk_SUDO: mk_CROSS
        @sudo make BREAKPOINT=$(BREAKPOINT) SUDO
        @touch $@
----------------------
so all SUDO targets are run as root.

Pierre
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to