Advertisement
s243a

LN#360-405 of make-tazpup

Jul 5th, 2018
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | None | 0 0
  1. #Line number 360-405 of make-tazpup
  2. echo "Mounting $(basename $IMGPUP)..."
  3.  
  4. mount -o ro $IMGPUP /mnt/wktaz
  5.  
  6. if [ $? -ne 0 ]; then
  7.     echo "Mounting puppy image failed"
  8.     exit
  9. fi
  10.  
  11. rootfslist="$(find /mnt/wktaz -type f -name "*.sfs")"
  12.  
  13. if [ "$rootfslist" == "" ]; then
  14.     echo "Not a puppy disc image"
  15.     umount /mnt/wktaz
  16.     exit
  17. fi
  18.  
  19. echo "Copying puppy kernel...."
  20.  
  21. cp -f /mnt/wktaz/vmlinuz $curdir/tazpup-preiso/
  22.  
  23. echo "Searching for kernel modules..."
  24.  
  25. for file1 in $(find /mnt/wktaz -type f -name "*.sfs")
  26. do
  27.  
  28.     mount -t squashfs $file1 /mnt/wksfs
  29.  
  30.     if [ $? -eq 0 ]; then
  31.  
  32.         if [ -d /mnt/wksfs/lib/modules ]; then
  33.             echo "Copying kernel modules from $(basename $file1) to rootfs..."
  34.             cp -rf /mnt/wksfs/lib/modules $curdir/slitaz-rootfs/lib/
  35.         fi
  36.    
  37.         if [ -d /mnt/wksfs/etc/modules ]; then
  38.             cp -rf /mnt/wksfs/etc/modules $curdir/slitaz-rootfs/etc/
  39.         fi
  40.    
  41.    
  42.     umount /mnt/wksfs
  43.     fi
  44.  
  45. done
  46.  
  47. umount /mnt/wktaz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement