AppleBag
Regular Contributor
I posted this an another thread but it was overlooked, so I'll ask here; is there a script or something that I can add that will monitor my clients list for clients that haven't connected in X amount of time, and if so, save it's info (MAC + name and chosen icon) to a file, remove it from NVRAM, and if the MAC is ever seen again, add it back from the backup file?
This way I'd never have to micromanage that portion of NVRAM; it would keep my clients list lean and mean, and if an old client ever crops back up I would immediately know what it is again since I had it's name saved.
Flow as I'm picturing it would be like this:
Perhaps a config file so the user cna choose how often to do the check, and how often to have it clear NVRAM of "dead" clients. Bonus if added as a Quality of Life tab in settings for the sexy points.
This way I'd never have to micromanage that portion of NVRAM; it would keep my clients list lean and mean, and if an old client ever crops back up I would immediately know what it is again since I had it's name saved.
Flow as I'm picturing it would be like this:
- Script checks custom_clientlist variable in NVRAM every (say) hour/day/whatever:
- Script stores all new clients in a file (name, mac, icon, last seen time)
- Script compares current clients during check with those in the stored file; those that exist in the file get any new stuff updated (timestamp of last check, and any name or icon changes, updating those as well if necessary)
- Those MACS that are not in the current list during check get moved to a second file, with last seen timestamp.
- After X amount of days/weeks/whatever if a MAC in the second file still hasn't shown face, remove it from NVRAM, to save NVRAM space (but keep it "forever" in the second file, in the off chance it may pop up a long way down the road, so at least you know what it is),
- If an "old" MAC in the second file ever does show back up, remove remove it from the second file and ill be added again to the first file.
Perhaps a config file so the user cna choose how often to do the check, and how often to have it clear NVRAM of "dead" clients. Bonus if added as a Quality of Life tab in settings for the sexy points.
Last edited: