reimplement update-rc

Signed-off-by: apporc <appleorchard2000@gmail.com>