How we can make script to automatically use both these commands?
For example, name of the script would be settime.sh, it would be run with same parameters as date (settime 23:12:11) and it would automatically set date to that time and afterward execute hwclock command.
Code:
#!/bin/sh
date $1
hwclock -w -u
How can I best run my newly created script settime.sh from KSM, or its terminal? Any suggestion how to set this up to easily set both system and hardware clock?