[packages] znc: commit missing parts of r24548
git-svn-id: svn://svn.openwrt.org/openwrt/packages@24552 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
6e6d686596
commit
5b4bbba46c
43
net/znc/patches/001-move_rootcheck_after_config.patch
Normal file
43
net/znc/patches/001-move_rootcheck_after_config.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
--- znc-0.094/main.cpp.orig 2010-10-25 02:30:18.000000000 +0200
|
||||||
|
+++ znc-0.094/main.cpp 2010-10-25 02:52:03.000000000 +0200
|
||||||
|
@@ -194,19 +194,6 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- if (isRoot()) {
|
||||||
|
- CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
|
||||||
|
- CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
|
||||||
|
- if (!bAllowRoot) {
|
||||||
|
- delete pZNC;
|
||||||
|
- return 1;
|
||||||
|
- }
|
||||||
|
- CUtils::PrintError("You have been warned.");
|
||||||
|
- CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root.");
|
||||||
|
- CUtils::PrintError("ZNC will start in 30 seconds.");
|
||||||
|
- sleep(30);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (bMakeConf) {
|
||||||
|
if (!pZNC->WriteNewConfig(sConfig)) {
|
||||||
|
delete pZNC;
|
||||||
|
@@ -227,6 +214,20 @@
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (isRoot()) {
|
||||||
|
+ CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
|
||||||
|
+ CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
|
||||||
|
+ if (!bAllowRoot) {
|
||||||
|
+ delete pZNC;
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ CUtils::PrintError("You have been warned.");
|
||||||
|
+ CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root.");
|
||||||
|
+ CUtils::PrintError("ZNC will start in 30 seconds.");
|
||||||
|
+ sleep(30);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
if (bForeground) {
|
||||||
|
int iPid = getpid();
|
||||||
|
CUtils::PrintMessage("Staying open for debugging [pid: " + CString(iPid) + "]");
|
Loading…
x
Reference in New Issue
Block a user