From 4068561f753d5f7065f6f96070f12c5dbf96a330 Mon Sep 17 00:00:00 2001 From: "jooseok.park" Date: Wed, 22 Aug 2012 08:55:12 +0900 Subject: [PATCH] migration from private to rsa --- contrib/start-stop-daemon.c | 4 +- debian/changelog | 9 + debian/patches/64_init_add_cmd_for_reboot.dpatch | 216 +++++++++++++++++++++ debian/patches/series | 1 + ...ixing-syntax-error-in-start-stop-daemon.c.patch | 32 +++ packaging/64_init_add_cmd_for_reboot.dpatch | 216 +++++++++++++++++++++ packaging/sysvinit.spec | 17 +- 7 files changed, 488 insertions(+), 7 deletions(-) create mode 100755 debian/patches/64_init_add_cmd_for_reboot.dpatch create mode 100644 packaging/0001-Fixing-syntax-error-in-start-stop-daemon.c.patch create mode 100644 packaging/64_init_add_cmd_for_reboot.dpatch diff --git a/contrib/start-stop-daemon.c b/contrib/start-stop-daemon.c index 6795ebd..ce286a2 100644 --- a/contrib/start-stop-daemon.c +++ b/contrib/start-stop-daemon.c @@ -109,8 +109,8 @@ do_help(void) { printf("\ start-stop-daemon for Debian Linux - small and fast C version written by\n\ -Marek Michalkiewicz , public domain.\n\ -VERSION \n\ +Marek Michalkiewicz , public domain.\n" +VERSION "\n\ \n\ Usage: start-stop-daemon -S|--start options ... -- arguments ...\n\ diff --git a/debian/changelog b/debian/changelog index 9ce777d..b8523bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +sysvinit (2.87dsf-8slp2+s5) unstable; urgency=low + + [ dongil01.park ] + * SLP add patch for supporting command with reboot. + * Git: slp/pkgs/s/sysvinit + * Tag: sysvinit_2.87dsf-8slp2+s5 + + -- Karol Lewandowski Wed, 18 Jan 2012 12:13:21 +0100 + sysvinit (2.87dsf-8slp2+s4) unstable; urgency=low * Bring sysvinit's postinst script back diff --git a/debian/patches/64_init_add_cmd_for_reboot.dpatch b/debian/patches/64_init_add_cmd_for_reboot.dpatch new file mode 100755 index 0000000..64905af --- /dev/null +++ b/debian/patches/64_init_add_cmd_for_reboot.dpatch @@ -0,0 +1,216 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 64_init_add_cmd_for_reboot.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/halt.c sysvinit/src/halt.c +--- sysvinit~/src/halt.c 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/halt.c 2012-01-17 15:48:10.765930225 +0900 +@@ -8,7 +8,7 @@ + * execute an "shutdown -r". This is for compatibility with + * sysvinit 2.4. + * +- * Usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] ++ * Usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] cmd + * -n: don't sync before halting the system + * -w: only write a wtmp reboot record and exit. + * -d: don't write a wtmp record. +@@ -16,7 +16,7 @@ + * -h: put harddisks in standby mode + * -i: shut down all network interfaces. + * -p: power down the system (if possible, otherwise halt). +- * ++ * cmd: command which delivered to reboot syscall. + * Reboot and halt are both this program. Reboot + * is just a link to halt. Invoking the program + * as poweroff implies the -p option. +@@ -51,6 +51,7 @@ + + char *Version = "@(#)halt 2.86 31-Jul-2004 miquels@cistron.nl"; + char *progname; ++char *cmd; + + #define KERNEL_MONITOR 1 /* If halt() puts you into the kernel monitor. */ + #define RUNLVL_PICKY 0 /* Be picky about the runlevel */ +@@ -64,7 +65,7 @@ + */ + void usage(void) + { +- fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n", ++ fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i] cmd%s\n", + progname, strcmp(progname, "halt") ? "" : " [-p]"); + fprintf(stderr, "\t-n: don't sync before halting the system\n"); + fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n"); +@@ -72,6 +73,7 @@ + fprintf(stderr, "\t-f: force halt/reboot, don't call shutdown.\n"); + fprintf(stderr, "\t-h: put harddisks in standby mode.\n"); + fprintf(stderr, "\t-i: shut down all network interfaces.\n"); ++ fprintf(stderr, "\tcmd: command which delivered to reboot syscall.\n"); + if (!strcmp(progname, "halt")) + fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n"); + exit(1); +@@ -148,6 +150,9 @@ + args[i++] = tm; + } + args[i++] = "now"; ++ if (cmd) { ++ args[i++] = cmd; ++ } + args[i++] = NULL; + + execv("/sbin/shutdown", args); +@@ -222,7 +227,11 @@ + usage(); + } + } +- if (argc != optind) usage(); ++ ++ if (argc > optind +1) { ++ fprintf(stderr, "%s: too many arguments.\n", argv[0]); ++ usage(); ++ } + + if (geteuid() != 0) { + fprintf(stderr, "%s: must be superuser.\n", progname); +@@ -231,6 +240,8 @@ + + (void)chdir("/"); + ++ cmd = argv[optind]; ++ + if (!do_hard && !do_nothing) { + /* + * See if we are in runlevel 0 or 6. +@@ -265,7 +276,10 @@ + if (do_nothing) exit(0); + + if (do_reboot) { +- init_reboot(BMAGIC_REBOOT); ++ if (cmd) ++ syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, argv[optind]); ++ else ++ init_reboot(BMAGIC_REBOOT); + } else { + /* + * Turn on hard reboot, CTRL-ALT-DEL will reboot now +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/init.c sysvinit/src/init.c +--- sysvinit~/src/init.c 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/init.c 2012-01-17 15:48:35.505929530 +0900 +@@ -197,6 +197,7 @@ + #define NR_EXTRA_ENV 16 + char *extra_env[NR_EXTRA_ENV]; + ++char* initcmd_getenv(char *data); + + /* + * Sleep a number of seconds. +@@ -915,6 +916,14 @@ + /* Split up command line arguments */ + buf[0] = 0; + strncat(buf, proc, sizeof(buf) - 1); ++ ++ char *opts = initcmd_getenv("INIT_OPTS"); ++ ++ if(!strncmp(ch->id, "rebt", 4) && opts) { ++ strncat(buf, " ", 1); ++ strncat(buf, opts, strlen(opts)); ++ } ++ + ptr = buf; + for(f = 1; f < 15; f++) { + /* Skip white space */ +@@ -1946,6 +1955,24 @@ + } + } + ++char* initcmd_getenv(char *data) ++{ ++ int i, j, sz; ++ char *ptr = NULL; ++ ++ sz = strlen(data); ++ ++ for (i = 0; i < NR_EXTRA_ENV; i++) { ++ if (extra_env[i] == NULL) continue; ++ if (!strncmp(extra_env[i], data, sz) && ++ extra_env[i][sz] == '=') { ++ ptr = &extra_env[i][sz+1]; ++ ++ return ptr; ++ } ++ } ++ return NULL; ++} + + /* + * Set/unset environment variables. The variables are +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/reboot.h sysvinit/src/reboot.h +--- sysvinit~/src/reboot.h 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/reboot.h 2012-01-17 15:48:40.141929398 +0900 +@@ -7,6 +7,8 @@ + */ + + #include ++#include ++#include + + #ifdef RB_ENABLE_CAD + # define BMAGIC_HARD RB_ENABLE_CAD +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/shutdown.c sysvinit/src/shutdown.c +--- sysvinit~/src/shutdown.c 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/shutdown.c 2012-01-17 15:51:32.121924563 +0900 +@@ -1,7 +1,7 @@ + /* + * shutdown.c Shut the system down. + * +- * Usage: shutdown [-krhfnc] time [warning message] ++ * Usage: shutdown [-krhfnc] time [warning message] cmd + * -k: don't really shutdown, only warn. + * -r: reboot after shutdown. + * -h: halt after shutdown. +@@ -10,6 +10,7 @@ + * -n: do not go through init but do it ourselves. + * -c: cancel an already running shutdown. + * -t secs: delay between SIGTERM and SIGKILL for init. ++ * cmd: command which delivered to reboot syscall. + * + * Author: Miquel van Smoorenburg, miquels@cistron.nl + * +@@ -102,7 +103,7 @@ + void usage(void) + { + fprintf(stderr, +- "Usage:\t shutdown [-akrhHPfnc] [-t secs] time [warning message]\n" ++ "Usage:\t shutdown [-akrhHPfnc] [-t secs] time [warning message] cmd\n" + "\t\t -a: use /etc/shutdown.allow\n" + "\t\t -k: don't really shutdown, only warn.\n" + "\t\t -r: reboot after shutdown.\n" +@@ -114,7 +115,8 @@ + "\t\t -n: do not go through \"init\" but go down real fast.\n" + "\t\t -c: cancel a running shutdown.\n" + "\t\t -t secs: delay between warning and kill signal.\n" +- "\t\t ** the \"time\" argument is mandatory! (try \"now\") **\n"); ++ "\t\t ** the \"time\" argument is mandatory! (try \"now\") **\n" ++ "\t\t cmd: command which delivered to reboot syscall.\n"); + exit(1); + } + +@@ -595,6 +597,16 @@ + strcat(message, argv[c]); + strcat(message, " "); + } ++ ++ if (message[0]) { ++ char *opts = malloc(strlen(message)); ++ strncpy(opts, message, strlen(message)-1); ++ opts[strlen(message)-1] = 0; ++ if (opts) { ++ init_setenv("INIT_OPTS", opts); ++ } ++ } ++ + if (message[0]) strcat(message, "\r\n"); + + /* See if we want to run or cancel. */ diff --git a/debian/patches/series b/debian/patches/series index 3a3bbd0..aca66c2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,6 +9,7 @@ 60_init_selinux_ifdef.dpatch 62_init_freebsdterm.dpatch 63_init_keep_utf8_ttyflag.patch +64_init_add_cmd_for_reboot.dpatch 70_compiler_warnings.dpatch 91_sulogin_lockedpw.dpatch 94_fstab-decode.dpatch diff --git a/packaging/0001-Fixing-syntax-error-in-start-stop-daemon.c.patch b/packaging/0001-Fixing-syntax-error-in-start-stop-daemon.c.patch new file mode 100644 index 0000000..3267be6 --- /dev/null +++ b/packaging/0001-Fixing-syntax-error-in-start-stop-daemon.c.patch @@ -0,0 +1,32 @@ +From 5c9ebe6dfdd14e24776206782e044f75665e8dfa Mon Sep 17 00:00:00 2001 +From: pkarurmo +Date: Fri, 6 Apr 2012 11:11:36 -0700 +Subject: [PATCH] Fixing syntax error in start-stop-daemon.c + +--- + contrib/start-stop-daemon.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/contrib/start-stop-daemon.c b/contrib/start-stop-daemon.c +index 6795ebd..045ede3 100644 +--- a/contrib/start-stop-daemon.c ++++ b/contrib/start-stop-daemon.c +@@ -112,13 +112,13 @@ start-stop-daemon for Debian Linux - small and fast C version written by\n\ + Marek Michalkiewicz , public domain.\n\ + VERSION \n\ + \n\ +-Usage: ++Usage:\ + start-stop-daemon -S|--start options ... -- arguments ...\n\ + start-stop-daemon -K|--stop options ...\n\ + start-stop-daemon -H|--help\n\ + start-stop-daemon -V|--version\n\ + \n\ +-Options (at least one of --exec|--pidfile|--user is required): ++Options (at least one of --exec|--pidfile|--user is required):\ + -x|--exec program to start/check if it is running\n\ + -p|--pidfile pid file to check\n\ + -u|--user | stop this user's processes\n\ +-- +1.7.5.4 + diff --git a/packaging/64_init_add_cmd_for_reboot.dpatch b/packaging/64_init_add_cmd_for_reboot.dpatch new file mode 100644 index 0000000..64905af --- /dev/null +++ b/packaging/64_init_add_cmd_for_reboot.dpatch @@ -0,0 +1,216 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 64_init_add_cmd_for_reboot.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/halt.c sysvinit/src/halt.c +--- sysvinit~/src/halt.c 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/halt.c 2012-01-17 15:48:10.765930225 +0900 +@@ -8,7 +8,7 @@ + * execute an "shutdown -r". This is for compatibility with + * sysvinit 2.4. + * +- * Usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] ++ * Usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] cmd + * -n: don't sync before halting the system + * -w: only write a wtmp reboot record and exit. + * -d: don't write a wtmp record. +@@ -16,7 +16,7 @@ + * -h: put harddisks in standby mode + * -i: shut down all network interfaces. + * -p: power down the system (if possible, otherwise halt). +- * ++ * cmd: command which delivered to reboot syscall. + * Reboot and halt are both this program. Reboot + * is just a link to halt. Invoking the program + * as poweroff implies the -p option. +@@ -51,6 +51,7 @@ + + char *Version = "@(#)halt 2.86 31-Jul-2004 miquels@cistron.nl"; + char *progname; ++char *cmd; + + #define KERNEL_MONITOR 1 /* If halt() puts you into the kernel monitor. */ + #define RUNLVL_PICKY 0 /* Be picky about the runlevel */ +@@ -64,7 +65,7 @@ + */ + void usage(void) + { +- fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n", ++ fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i] cmd%s\n", + progname, strcmp(progname, "halt") ? "" : " [-p]"); + fprintf(stderr, "\t-n: don't sync before halting the system\n"); + fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n"); +@@ -72,6 +73,7 @@ + fprintf(stderr, "\t-f: force halt/reboot, don't call shutdown.\n"); + fprintf(stderr, "\t-h: put harddisks in standby mode.\n"); + fprintf(stderr, "\t-i: shut down all network interfaces.\n"); ++ fprintf(stderr, "\tcmd: command which delivered to reboot syscall.\n"); + if (!strcmp(progname, "halt")) + fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n"); + exit(1); +@@ -148,6 +150,9 @@ + args[i++] = tm; + } + args[i++] = "now"; ++ if (cmd) { ++ args[i++] = cmd; ++ } + args[i++] = NULL; + + execv("/sbin/shutdown", args); +@@ -222,7 +227,11 @@ + usage(); + } + } +- if (argc != optind) usage(); ++ ++ if (argc > optind +1) { ++ fprintf(stderr, "%s: too many arguments.\n", argv[0]); ++ usage(); ++ } + + if (geteuid() != 0) { + fprintf(stderr, "%s: must be superuser.\n", progname); +@@ -231,6 +240,8 @@ + + (void)chdir("/"); + ++ cmd = argv[optind]; ++ + if (!do_hard && !do_nothing) { + /* + * See if we are in runlevel 0 or 6. +@@ -265,7 +276,10 @@ + if (do_nothing) exit(0); + + if (do_reboot) { +- init_reboot(BMAGIC_REBOOT); ++ if (cmd) ++ syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, argv[optind]); ++ else ++ init_reboot(BMAGIC_REBOOT); + } else { + /* + * Turn on hard reboot, CTRL-ALT-DEL will reboot now +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/init.c sysvinit/src/init.c +--- sysvinit~/src/init.c 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/init.c 2012-01-17 15:48:35.505929530 +0900 +@@ -197,6 +197,7 @@ + #define NR_EXTRA_ENV 16 + char *extra_env[NR_EXTRA_ENV]; + ++char* initcmd_getenv(char *data); + + /* + * Sleep a number of seconds. +@@ -915,6 +916,14 @@ + /* Split up command line arguments */ + buf[0] = 0; + strncat(buf, proc, sizeof(buf) - 1); ++ ++ char *opts = initcmd_getenv("INIT_OPTS"); ++ ++ if(!strncmp(ch->id, "rebt", 4) && opts) { ++ strncat(buf, " ", 1); ++ strncat(buf, opts, strlen(opts)); ++ } ++ + ptr = buf; + for(f = 1; f < 15; f++) { + /* Skip white space */ +@@ -1946,6 +1955,24 @@ + } + } + ++char* initcmd_getenv(char *data) ++{ ++ int i, j, sz; ++ char *ptr = NULL; ++ ++ sz = strlen(data); ++ ++ for (i = 0; i < NR_EXTRA_ENV; i++) { ++ if (extra_env[i] == NULL) continue; ++ if (!strncmp(extra_env[i], data, sz) && ++ extra_env[i][sz] == '=') { ++ ptr = &extra_env[i][sz+1]; ++ ++ return ptr; ++ } ++ } ++ return NULL; ++} + + /* + * Set/unset environment variables. The variables are +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/reboot.h sysvinit/src/reboot.h +--- sysvinit~/src/reboot.h 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/reboot.h 2012-01-17 15:48:40.141929398 +0900 +@@ -7,6 +7,8 @@ + */ + + #include ++#include ++#include + + #ifdef RB_ENABLE_CAD + # define BMAGIC_HARD RB_ENABLE_CAD +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' sysvinit~/src/shutdown.c sysvinit/src/shutdown.c +--- sysvinit~/src/shutdown.c 2012-01-17 11:50:23.000000000 +0900 ++++ sysvinit/src/shutdown.c 2012-01-17 15:51:32.121924563 +0900 +@@ -1,7 +1,7 @@ + /* + * shutdown.c Shut the system down. + * +- * Usage: shutdown [-krhfnc] time [warning message] ++ * Usage: shutdown [-krhfnc] time [warning message] cmd + * -k: don't really shutdown, only warn. + * -r: reboot after shutdown. + * -h: halt after shutdown. +@@ -10,6 +10,7 @@ + * -n: do not go through init but do it ourselves. + * -c: cancel an already running shutdown. + * -t secs: delay between SIGTERM and SIGKILL for init. ++ * cmd: command which delivered to reboot syscall. + * + * Author: Miquel van Smoorenburg, miquels@cistron.nl + * +@@ -102,7 +103,7 @@ + void usage(void) + { + fprintf(stderr, +- "Usage:\t shutdown [-akrhHPfnc] [-t secs] time [warning message]\n" ++ "Usage:\t shutdown [-akrhHPfnc] [-t secs] time [warning message] cmd\n" + "\t\t -a: use /etc/shutdown.allow\n" + "\t\t -k: don't really shutdown, only warn.\n" + "\t\t -r: reboot after shutdown.\n" +@@ -114,7 +115,8 @@ + "\t\t -n: do not go through \"init\" but go down real fast.\n" + "\t\t -c: cancel a running shutdown.\n" + "\t\t -t secs: delay between warning and kill signal.\n" +- "\t\t ** the \"time\" argument is mandatory! (try \"now\") **\n"); ++ "\t\t ** the \"time\" argument is mandatory! (try \"now\") **\n" ++ "\t\t cmd: command which delivered to reboot syscall.\n"); + exit(1); + } + +@@ -595,6 +597,16 @@ + strcat(message, argv[c]); + strcat(message, " "); + } ++ ++ if (message[0]) { ++ char *opts = malloc(strlen(message)); ++ strncpy(opts, message, strlen(message)-1); ++ opts[strlen(message)-1] = 0; ++ if (opts) { ++ init_setenv("INIT_OPTS", opts); ++ } ++ } ++ + if (message[0]) strcat(message, "\r\n"); + + /* See if we want to run or cancel. */ diff --git a/packaging/sysvinit.spec b/packaging/sysvinit.spec index 4ade7e4..ad53b19 100644 --- a/packaging/sysvinit.spec +++ b/packaging/sysvinit.spec @@ -31,6 +31,8 @@ Patch14: always_use_lcrypt.patch Patch15: dont_set_ownership.patch Patch16: add_initscripts.patch Patch17: add_sysvrc.patch +Patch18: 64_init_add_cmd_for_reboot.dpatch +Patch19: 0001-Fixing-syntax-error-in-start-stop-daemon.c.patch %description The sysvinit package contains a group of processes that control @@ -43,6 +45,7 @@ of all other programs. Summary: System-V-like utilities Group: System/Base Provides: /usr/sbin/service +Provides: /bin/pidof %description utils This package contains the important System-V-like utilities. @@ -52,7 +55,7 @@ Provides: /usr/sbin/service %package -n sysv-rc Summary: System-V-like runlevel change mechanism Group: System/Base -Requires: sysvinit-utils, insserv +Requires: sysvinit-utils %description -n sysv-rc This package provides support for the System-V like system @@ -93,6 +96,8 @@ Requires: /usr/sbin/update-rc.d %patch15 -p1 -b .dont_set_ownership %patch16 -p1 %patch17 -p1 +%patch18 -p1 +%patch19 -p1 %build make -C src @@ -233,7 +238,8 @@ do if [ ! -f "$F" ] && touch "$F" >/dev/null 2>&1 then echo "(Nothing has been logged yet.)" >| "$F" - chown root:adm "$F" + # root UID is 0, adm GID is ordinary 4 + chown 0:4 "$F" chmod 640 "$F" fi done @@ -309,8 +315,9 @@ then # if ! mountpoint -q /dev then - [ -d /dev/pts ] || { mkdir --mode=755 /dev/pts ; chown root:root /dev/pts || [ "$FAKECHROOT" = true ]; } - [ -d /dev/shm ] || { mkdir --mode=755 /dev/shm ; chown root:root /dev/shm || [ "$FAKECHROOT" = true ]; } + # root UID is 0 + [ -d /dev/pts ] || { mkdir --mode=755 /dev/pts ; chown 0:0 /dev/pts || [ "$FAKECHROOT" = true ]; } + [ -d /dev/shm ] || { mkdir --mode=755 /dev/shm ; chown 0:0 /dev/shm || [ "$FAKECHROOT" = true ]; } fi fi @@ -348,7 +355,6 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -/bin/pidof /sbin/init /sbin/halt /sbin/runlevel @@ -361,6 +367,7 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/initreq.h %files utils +/bin/pidof /sbin/bootlogd /sbin/fstab-decode /sbin/killall5 -- 2.7.4