I have almost completed my setup and it is working as it should.
I am currently using the filecopy feature to move a directory of drivers to the PC after deployment where I then use a powershell script to check the model and install the correct drivers.
There is one problem with this: The driver directory has to be copied in full, with drivers for all models, which gives 12 GB extra spread over a large number of files. This takes quite a while.
I was thinking that if the filecopy could check the model and then just copy that specific directory for that specific machine, it could cut down the time severely.
I know a little about what to do:
The model name for Lenovo laptops is located in /sys/devices/virtual/dmi/id/product_version (for many other models it would probably be located at /sys/devices/virtual/dmi/id/product_name )
This gives me the string "ThinkPad T460s". The Driver directory would only contain the "T460s" part though, so I would separate the string and only copy the directory that contains the remaining string.
The first part I think I can do with this:
IFS=',' read -a model <<< "$computer_model"
I can also copy a folder containing a specific string, but I am stumped as to how I can combine it with CD's filecopy process.
How do I check if one of the folders in the filecopy is called "Drivers" and then how can I make it skip that single directory and launch my own code?
As you can tell I am very new to Bash scripting (and Linux in general), so I appreciate any help you can give me.