1 # Copyright (C) 2006 OpenWrt.org
2 # Copyright (C) 2010 Vertical Communications
12 grep -q "^$1:" "$file2" || echo "$*"
19 boot_run_hook preinit_mount_root
20 [ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
21 echo "- config restore -"
22 cp /etc/passwd /etc/group /etc/shadow /tmp
24 [ -f /sysupgrade.tgz ] && tar xzf /sysupgrade.tgz
25 [ -f /tmp/sysupgrade.tar ] && tar xf /tmp/sysupgrade.tar
26 missing_lines /tmp/passwd /etc/passwd >> /etc/passwd
27 missing_lines /tmp/group /etc/group >> /etc/group
28 missing_lines /tmp/shadow /etc/shadow >> /etc/shadow
29 rm /tmp/passwd /tmp/group /tmp/shadow
30 # Prevent configuration corruption on a power loss
35 [ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root