[Bug 10801] New: applets/install.sh handles hardlinks incorrectly

bugzilla at busybox.net bugzilla at busybox.net
Fri Feb 23 01:33:19 UTC 2018


https://bugs.busybox.net/show_bug.cgi?id=10801

            Bug ID: 10801
           Summary: applets/install.sh handles hardlinks incorrectly
           Product: Busybox
           Version: 1.28.x
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: opal at wowana.me
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Trying to install busybox with hardlinks and a custom PREFIX will fail for
applets not in the /bin directory, because relative pathnames are used.
applets/install.sh is *supposed to* use the absolute pathname for hardlinks but
it fails to do so because the wrong check is used in the if statement. Patch
below fixes it.

diff --git a/applets/install.sh b/applets/install.sh                            
index ae99381d7..c6f23c7e4 100755                                               
--- a/applets/install.sh                                                        
+++ b/applets/install.sh                                                        
@@ -105,7 +105,7 @@ for i in $h; do                                             
                        exit 1                                                  
                fi                                                              
        else                                                                    
-               if [ "$2" = "--hardlinks" ]; then                               
+               if [ "$linkopts" = "-f" ]; then                                 
                        bb_path="$prefix/bin/busybox"                           
                else                                                            
                        case "$appdir" in

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list