restorefactory: small makefile update
authorNuno Goncalves <nunojpg@gmail.com>
Sun, 19 Dec 2010 01:17:57 +0000 (01:17 +0000)
committerNuno Goncalves <nunojpg@gmail.com>
Sun, 19 Dec 2010 01:17:57 +0000 (01:17 +0000)
SVN-Revision: 24696

net/sshtunnel/Makefile
utils/restorefactory/Makefile
utils/restorefactory/files/etc/hotplug.d/button/50-restorefactory [deleted file]
utils/restorefactory/files/etc/uci-defaults/50-restorefactory [deleted file]
utils/restorefactory/files/hotplug_restorefactory [new file with mode: 0755]
utils/restorefactory/files/uci_defaults_restorefactory [new file with mode: 0755]
utils/watchcat/Makefile

index f75fcbbfb985e75093b9c7c28d82994887fdb4db..c704004c68bcafa43e020f4a2408776bb112d471 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sshtunnel
 PKG_VERSION:=3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
index a359a66d4cc1109bf5eb76e0c3b6d9be8a3a3769..fbee589a767ad6963fa7c02487b477360837a744 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=restorefactory
 PKG_VERSION:=1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,7 +29,10 @@ define Build/Compile
 endef
 
 define Package/restorefactory/install
-       $(CP) ./files/* $(1)
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/button
+       $(INSTALL_BIN) ./files/hotplug_restorefactory $(1)/etc/hotplug.d/button/50-restorefactory
+       $(INSTALL_DIR) $(1)/etc/defaults
+       $(INSTALL_BIN) ./files/uci_defaults_restorefactory $(1)/etc/defaults/50-restorefactory
 endef
 
 $(eval $(call BuildPackage,restorefactory))
diff --git a/utils/restorefactory/files/etc/hotplug.d/button/50-restorefactory b/utils/restorefactory/files/etc/hotplug.d/button/50-restorefactory
deleted file mode 100755 (executable)
index 5273499..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-system_config() {
-       config_get button "$1" button "reset"
-       config_get action "$1" action "pressed"
-       config_get timeout "$1" timeout "5"
-}
-
-config_load system
-config_foreach system_config restorefactory
-
-[ "$BUTTON" = "$button" ] && {
-
-       [ -f /tmp/run/restorefactory.pid ] && read PID < /tmp/run/restorefactory.pid && kill $PID && rm /tmp/run/restorefactory.pid && logger -p user.info -t "restorefactory" "restore to factory defaults aborted"
-
-       [ "$ACTION" = "$action" ] && {
-
-               if [ "$timeout" -gt 0 ]
-               then
-                       sleep "$timeout" && firstboot && reboot &
-                       echo $! > /tmp/run/restorefactory.pid
-                       logger -p user.info -t "restorefactory" "restoring to factory defaults in $timeout seconds"
-               elif [ "$timeout" -eq 0 ]
-               then
-                       firstboot && reboot &
-               else
-                       logger -p user.info -t "restorefactory" "invalid timeout value ($timeout)"
-               fi
-       }
-} 
-
diff --git a/utils/restorefactory/files/etc/uci-defaults/50-restorefactory b/utils/restorefactory/files/etc/uci-defaults/50-restorefactory
deleted file mode 100755 (executable)
index ad27b48..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-uci add system restorefactory
-uci set system.@restorefactory[0].button=reset
-uci set system.@restorefactory[0].action=pressed
-uci set system.@restorefactory[0].timeout=5
-uci commit
diff --git a/utils/restorefactory/files/hotplug_restorefactory b/utils/restorefactory/files/hotplug_restorefactory
new file mode 100755 (executable)
index 0000000..5273499
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+system_config() {
+       config_get button "$1" button "reset"
+       config_get action "$1" action "pressed"
+       config_get timeout "$1" timeout "5"
+}
+
+config_load system
+config_foreach system_config restorefactory
+
+[ "$BUTTON" = "$button" ] && {
+
+       [ -f /tmp/run/restorefactory.pid ] && read PID < /tmp/run/restorefactory.pid && kill $PID && rm /tmp/run/restorefactory.pid && logger -p user.info -t "restorefactory" "restore to factory defaults aborted"
+
+       [ "$ACTION" = "$action" ] && {
+
+               if [ "$timeout" -gt 0 ]
+               then
+                       sleep "$timeout" && firstboot && reboot &
+                       echo $! > /tmp/run/restorefactory.pid
+                       logger -p user.info -t "restorefactory" "restoring to factory defaults in $timeout seconds"
+               elif [ "$timeout" -eq 0 ]
+               then
+                       firstboot && reboot &
+               else
+                       logger -p user.info -t "restorefactory" "invalid timeout value ($timeout)"
+               fi
+       }
+} 
+
diff --git a/utils/restorefactory/files/uci_defaults_restorefactory b/utils/restorefactory/files/uci_defaults_restorefactory
new file mode 100755 (executable)
index 0000000..ad27b48
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+uci add system restorefactory
+uci set system.@restorefactory[0].button=reset
+uci set system.@restorefactory[0].action=pressed
+uci set system.@restorefactory[0].timeout=5
+uci commit
index faf009188a6949267ab4cc6ffef60aca3c6eb4ce..3c9016e62ccbaf5c03c41582cd5ba073e8ab3686 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=watchcat
 PKG_VERSION:=1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,7 +34,7 @@ endef
 define Package/watchcat/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/initd_watchcat $(1)/etc/init.d/watchcat
-       $(INSTALL_DIR) $(1)/etc/init.d  
+       $(INSTALL_DIR) $(1)/etc/defaults        
        $(INSTALL_BIN) ./files/uci_defaults_watchcat $(1)/etc/defaults/50-watchcat
 endef