kiss-stj

My KISS Linux repo for software I use on my computers.
git clone https://git.stjo.hn/kiss-stj
Log | Files | Refs | README | LICENSE

build (1164B)


      1 #!/usr/bin/env sh
      2 
      3 # Switch all the paths from /bin to to /usr/bin.
      4 find . -type f -exec grep -l '/bin/' {} \+ |
      5 	while IFS= read -r file ; do
      6 		sed 's|/bin/|/usr/bin/|g' "$file" > _
      7 		mv -f _ "$file"
      8 	done
      9 chmod +x svc.d/bare.sh
     10 
     11 # Don't start ntpd until the network is up.
     12 sed "s/if \[ -z \"\$PID\" \]/if [ -z \"\$PID\" ] \&\& (route | tail -n 1 | tr -s ' ' | cut -f 4 -d ' ' | grep -q U)/" svc.d/avail/ntpd > _
     13 mv -f _ svc.d/avail/ntpd
     14 
     15 install -m 755 -D bin/service "$1/usr/bin/service"
     16 install -m 755 -D bin/svc "$1/usr/bin/svc"
     17 cp -r svc.d "$1/usr/bin/svc.d"
     18 
     19 # Custom init scripts.
     20 # Support for sbase cron.
     21 touch "$1/usr/bin/svc.d/avail/cron"
     22 # Use cron's defaults. The params here won't work with busybox cron.
     23 rm "$1/usr/bin/svc.d/default/crond"
     24 touch "$1/usr/bin/svc.d/avail/dhcpcd"
     25 install -D nldev "$1/usr/bin/svc.d/avail/nldev"
     26 touch "$1/usr/bin/svc.d/avail/pcscd"
     27 touch "$1/usr/bin/svc.d/avail/sdhcp"
     28 touch "$1/usr/bin/svc.d/avail/seatd"
     29 install -D tlp "$1/usr/bin/svc.d/avail/tlp"
     30 touch "$1/usr/bin/svc.d/avail/wpa_supplicant"
     31 chmod +x "$1/usr/bin/svc.d/avail"/*
     32 
     33 # Install the license
     34 install -m 755 -D LICENSE "$1/usr/share/LICENSES/svc.license"