Advertisement
s243a

fix_procps.sh

Mar 31st, 2019
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. #
  4.  
  5. curdir=`pwd`
  6. prefix="/64"
  7. #Somd utilities in procps link to missing library libproc-3.2.8.so
  8. while read -r line; do #https://unix.stackexchange.com/questions/85060/getting-relative-links-between-two-paths
  9.   #https://stackoverflow.com/questions/9293887/reading-a-delimited-string-into-an-array-in-bash
  10.   #https://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_10_02.html
  11.   arr=($line)
  12.   target_f=$curdir/slitaz-rootfs$prefix${arr[0]}
  13.   source_f=${arr[1]}
  14.   if [ -f $target_f ]; then
  15.    
  16.     fname=`bname $target_f`
  17.     target_d=`dirname $target_f`
  18.     mv $target_f $target_d/$fname-old
  19.     cd $target_d
  20.     pwd
  21.     ln -s source_f fname
  22.   fi
  23. done <<EOM
  24. /sbin/sysctl ../bin/busybox
  25. /bin/ps busybox
  26. /bin/kill busybox
  27. /usr/bin/w ../bin/busybox
  28. /usr/bin/pmap ../bin/busybox
  29. /usr/bin/free ../bin/busybox
  30. /usr/bin/uptime ../bin/busybox
  31. /usr/bin/pkill ../bin/busybox
  32. /usr/bin/pgrep ../bin/busybox
  33. /usr/bin/top ../bin/busybox
  34. /usr/bin/watch ../bin/busybox
  35. EOM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement